Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ok so I have a long list of data. I have 32 lines of good stuff an
then 10 bad lines, repeating for around 30000 lines. I need to remov the 10 bad lines. I am trying to do it by looking to see if the cel is empty or has a cetain value in it and then removes the whole row. It doesn't run. Help please. Sub Trash() Dim myCell As Range, rng As Range, RW As Range Set rng = Range("C9:C28870") For Each myCell In rng If IsEmpty(myCell) Then RW = myCell.row Rows(RW).Select Selection.Delete Shift:=xlUp End If If Not IsEmpty(myCell) And myCell.Value = "grp / transactionhisto Then RW = myCell.row Rows(RW).Select Selection.Delete Shift:=xlUp End If Next myCell End Su -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
trouble getting a formula to repeat rows | New Users to Excel | |||
Trouble using macros to insert rows | Excel Discussion (Misc queries) | |||
trouble grouping rows/columns | Excel Discussion (Misc queries) | |||
Trouble with skipping rows | Excel Worksheet Functions | |||
Removing Blank Rows? | Excel Programming |