View Single Post
 
Old 02-02-2017, 06:12 PM
ThisGuyJohn ThisGuyJohn is offline Windows 7 64bit Office 2016
Novice
 
Join Date: Jan 2017
Posts: 6
ThisGuyJohn is on a distinguished road
Default

When you run this it will delete all the rows with blank spaces country and spain

Code:
Sub Filter()
    Dim b As Long
    With ActiveSheet
        For b = .Cells(Rows.Count, "b").End(xlUp).Row To 1 Step -1
            With .Rows(b)
                
                    If Not .Range("b1").Value = "Country" Then
                    If Not .Range("b1").Value = "Spain" Then
                    If Not .Range("b1").Value = vbNullString Then
                        .Delete
                    End If
                    End If
                    End If
                
            End With
        Next b
    End With
    
End Sub
Reply With Quote