Prev: Attempting to schtask for defrag on remote XP computers in domain
Next: Find and remove rows with the word "TRUE" in Excel
From: OldDog on 14 Apr 2010 16:13 Hi, Hes is a bit of code that will delete all the rows that do not have an entry in col "B". intRow = 2 Do Until ws2.Cells(intRow, 1).Value = "" If ws2.Cells(intRow, 2).Value = "" Then 'Delete row range ws2.Rows(intRow & ":" & Row).Delete 'ROW is the lasr used row defined earlier. intRow = intRow + 1 Else intRow = intRow + 1 End If Loop My next task is to delete all the rows with the word "TRUE" in col "B". If I put: If ws2.Cells(intRow, 2).Value = "TRUE" It deletes every row in the spreadsheet. How do I escape "TRUE" so that my code can find it? TIA; OldDog |