I am able to write a formula to extract the first 6 characters of a cell
= LEFT(A6, 6)
with A6 being the particular cell that the data is coming from
What I'm wanting to do is be able to insert a similar command into a macro that will delete the entire row for each row that has a specific string at the start of the cell contents. The loop will end when there is no data in column 1. There are thousands of records that I need to check this data from, and I'm not sure of how to do it
What I have so far is this, with the string that I'm looking for is "6digit"
CR= 2
Done = False
Do
If Worksheets("Data").Cells(CR, 1) = "" Then
Done = True
Else
If Worksheets("Data").Cells(CR, 1)????????? = "6digit" Then
Rows(CR).Select
Selection.Delete Shift:=xlToUp
Else
CR = CR + 1
End if
End if
Loop until done
with the red portion the code that I know is wrong. Any help on this would be greatly appreciated. Thanks
Bookmarks