Happy hump day!
I am simply trying to delete all rows that have a value of less than 16 in the cell value's first 2 characters (column G).
start with:
18N
18K
16K
16K
16K
14L
14L
13L
12L
end with:
18N
18K
16K
16K
16K
the code I am using:
but it is not working.
ANY & ALL help appreciated.
I am simply trying to delete all rows that have a value of less than 16 in the cell value's first 2 characters (column G).
start with:
18N
18K
16K
16K
16K
14L
14L
13L
12L
end with:
18N
18K
16K
16K
16K
the code I am using:
Code:
Sub DeleteUnneededRows()
Dim c
For Each c In Worksheets("Sheet1").Range("G1:G500").Cells
If Left(c.Value, 2) < "16" Then
c.EntireRow.Delete
End If
Next
End Sub
but it is not working.
ANY & ALL help appreciated.