Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to use this mcaro to delete rowsa based on the value of Column B
and it isn't working Sub DeleteCM() lastrow = Cells(Rows.Count, "B").End(xlUp).Row Set myrange = Range("B2:B" & lastrow) For Each Count In myrange If Count.Value = "CM" Then Count.EntireRow.Delete End If Next End Sub Any help would be appreciated. BTW there are 2 other values I want to delete the rows if they exist "IC" and "MG". Do I need 3 separate macros? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Fine Tuning | Excel Programming | |||
Macro fine Run fine from Select but not from KB Shortcut? | Excel Discussion (Misc queries) | |||
help w/ fine tuning | New Users to Excel | |||
Fine tuning if statement.... | Excel Programming | |||
Fine-tuning selection change event for merged cells & wrap text | Excel Programming |