Hi Mr Excel Fans,
can you kindly help me with this code below: it will not delete the entire row when Column U contains data called "FREE", how ever it will change the colour of it
' Will not delete the entire row if data matched in column U
For i = 6 To LastRowFind
If Sheets("Sheet1").Cells(i, "U").Value <> "FREE" Then
Sheets("Sheet1").Cells(i, "U").EntireRow.Delete
End If
Next i
' same test code the colour entire row works
For i = 6 To LastRowFind
If Sheets("Sheet1").Cells(i, "U").Value <> "FREE" Then
Sheets("Sheet1").Cells(i, "U").EntireRow.Interior.Color = 12611584
End If
Next i
What am I doing wrong to delete the entire row?
Thanks
Aaron.
can you kindly help me with this code below: it will not delete the entire row when Column U contains data called "FREE", how ever it will change the colour of it
' Will not delete the entire row if data matched in column U
For i = 6 To LastRowFind
If Sheets("Sheet1").Cells(i, "U").Value <> "FREE" Then
Sheets("Sheet1").Cells(i, "U").EntireRow.Delete
End If
Next i
' same test code the colour entire row works
For i = 6 To LastRowFind
If Sheets("Sheet1").Cells(i, "U").Value <> "FREE" Then
Sheets("Sheet1").Cells(i, "U").EntireRow.Interior.Color = 12611584
End If
Next i
What am I doing wrong to delete the entire row?
Thanks
Aaron.