Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Using xl2000. In a range of approx 12000 rows, I am deleting rows that match
17 different criteria. Is there an easy way to include the first row? The main code is a variation on one of Chip Pearson's posts and runs from the bottom of the range and works upwards using: Range([a1], [a65536].End(xlUp)).Select ColNum = Selection(1).Column For RowNdx = Selection( _ Selection.Cells.Count).Row To _ Selection(1).Row + 1 Step -1 'Times before 07:40 If Cells(RowNdx, ColNum).Offset(0, 1).Value < 0.319444 Then Cells(RowNdx, ColNum).EntireRow.Delete End If Next RowNdx i.e., for the above code, if B1 contains, say, 06:30, the above code does all the rest, but not the first row. Should I just include a "control row" at the top or is there a better way? Martin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
For RowNdx = Cells(Rows.Count,"A").End(xlUp).Row To 1 Step -1
'Times before 07:40 If Cells(RowNdx, "A").Offset(0, 1).Value < 0.319444 Then Cells(RowNdx, "A").EntireRow.Delete End If Next RowNdx -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "TiscaliNews" wrote in message ... Using xl2000. In a range of approx 12000 rows, I am deleting rows that match 17 different criteria. Is there an easy way to include the first row? The main code is a variation on one of Chip Pearson's posts and runs from the bottom of the range and works upwards using: Range([a1], [a65536].End(xlUp)).Select ColNum = Selection(1).Column For RowNdx = Selection( _ Selection.Cells.Count).Row To _ Selection(1).Row + 1 Step -1 'Times before 07:40 If Cells(RowNdx, ColNum).Offset(0, 1).Value < 0.319444 Then Cells(RowNdx, ColNum).EntireRow.Delete End If Next RowNdx i.e., for the above code, if B1 contains, say, 06:30, the above code does all the rest, but not the first row. Should I just include a "control row" at the top or is there a better way? Martin |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don and Bob,
Thank you gentlemen, problem solved. Martin |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Graph to only include rows with data in | Excel Discussion (Misc queries) | |||
Graph to only include rows with data in | Charts and Charting in Excel | |||
Sum formula to include new rows added | Excel Worksheet Functions | |||
Sorting to Include Blank Rows | Excel Discussion (Misc queries) | |||
Charts to automatically include new rows | Excel Discussion (Misc queries) |