Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I need help. Is it possible to search for the word "total" in an cell on the active Excel worksheet, then delete the entire row and/o column where "total" exists ? Any help is appreciated. Thanks : -- Lawler ----------------------------------------------------------------------- Lawlerd's Profile: http://www.excelforum.com/member.php...fo&userid=1547 View this thread: http://www.excelforum.com/showthread.php?threadid=27057 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Lawlerd, this code was posted by Frank Kabel, it should do what you
you need, it will delete every row with the word 'total' in column A... Sub delete_rows() Dim RowNdx As Long Dim LastRow As Long LastRow = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).row For RowNdx = LastRow To 1 Step -1 If Cells(RowNdx, "A").Value = "total" Then Rows(RowNdx).Delete End If Next RowNdx End Sub ste |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"Last Cell" to find last row, but can't delete blank rows | Excel Discussion (Misc queries) | |||
possible? =if(That cell = "a certain word", delete row, go next) | Excel Discussion (Misc queries) | |||
Search "Total" in all worksheets and delete rows containing "Total" | Excel Programming | |||
Delete find "Grand Total" | Excel Programming | |||
Delete find "Grand Total" | Excel Programming |