Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All......
I have two macros, the first one works to delete rows if a cell in column H is empty. Sub DeleterowsNONAME() Dim lastrow As Long, r As Long Application.ScreenUpdating = False lastrow = Cells(Rows.Count, "a").End(xlUp).Row For r = lastrow To 2 Step -1 If Cells(r, "h") = "" Then Rows(r).EntireRow.Delete End If Next r Application.ScreenUpdating = True End Sub The second one, I'm trying to modify so if the word "trust" is found anywhere in the cell string, to delete the entire row.....this one don't work. Sub DeleterowsTRUST() Dim lastrow As Long, r As Long Application.ScreenUpdating = False lastrow = Cells(Rows.Count, "a").End(xlUp).Row For r = lastrow To 2 Step -1 If Cells(r, "h") = "*TRUST*" Then Rows(r).EntireRow.Delete End If Next r Application.ScreenUpdating = True End Sub Any help would be appreciated............using XL97 Vaya con Dios, Chuck, CABGx3 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
match value within any portion of lookup string in range | Excel Worksheet Functions | |||
Finding string and color the found string | Excel Programming | |||
Bold a portion of concatenated string | Excel Discussion (Misc queries) | |||
Extracting A Portion Of A String | Excel Programming | |||
How to replace defined portion of string | Excel Programming |