Hi
I have a set of data, where I want to scroll through the rows, and delete the ones that have the word “BlanK” in column C. I would also like to stop when a cell in column C is empty.The data are imported from a .csv file and are in General format. A newbie, I am still not fully versed in the VBA syntax and I have tried a couple of things but can’t seem to get it to work correctly. It seems to me that this should be rather simple but I have already blown a couple of hours on this. Any suggestions would be greatly appreciated.
I tried this but it doesn’t seem to recognize “Blank” or Blank. There also may be an issue when a row is deleted (the old active cell is now the new active cell without being offset. I am using Excel 2007.
Sub DeleteRows()
Range(“c5”).Activate
Do While ActiveCell.Value Empty
If ActiveCell.Value = “Blank” Then
Rows(ActiveCell.Row).Delete
Else
ActiveCell = ActiveCell.Offset(1, 0).Select
End If
ActiveCell = ActiveCell.Offset(1, 0).Select
Loop
End Sub