LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete Rows - include top row

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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Graph to only include rows with data in Michelle Excel Discussion (Misc queries) 3 December 9th 08 04:21 PM
Graph to only include rows with data in Michelle Charts and Charting in Excel 3 December 9th 08 04:21 PM
Sum formula to include new rows added desperateforanswers Excel Worksheet Functions 2 November 6th 08 09:32 AM
Sorting to Include Blank Rows Robert M Excel Discussion (Misc queries) 2 July 14th 07 12:57 PM
Charts to automatically include new rows madeqx Excel Discussion (Misc queries) 2 July 27th 05 02:29 PM


All times are GMT +1. The time now is 05:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"