Hi,
Does any one have suggestions for a macro that will look at column G and if the cell does not contain an "A" or "L", delete the entire row. The Macro I am currently running is not working. Any help would be greatly appreciated!
Thanks
Hi,
Does any one have suggestions for a macro that will look at column G and if the cell does not contain an "A" or "L", delete the entire row. The Macro I am currently running is not working. Any help would be greatly appreciated!
Thanks
Here's how I would delete a row. Just update curRow with the row number you want to delete.
RowSel = curRow & ":" & curRow
ActiveSheet.Range(RowSel).Delete Shift:=xlDown
try:
Sub DeleteCondition()
lastrw = [d65536].End(xlUp).Row
For x = lastrw To 1 Step -1
If Not Cells(x, "d") Like "*A*" Xor Not Cells(x, "d") Like "*L*" Then
Cells(x, "d").EntireRow.Delete
End If
Next
End Sub
-DM
Thanks!!!!
Your suggestion worked great!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks