LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
bodhisatvaofboogie
 
Posts: n/a
Default Selecting AND Deleting

I am working on More macros and I am trying to figure out how to Select Every
row except for the last 10. SO:

Select rows 1 through Last Row - 9.
Delete selected rows

LastRow = Cells(Rows.Count, "V").End(xlUp).Row
Cells(LastRow + 2, "V") = Application.Sum _
(Range(Cells(1, "V"), Cells(LastRow, "V")))

That is what I am using in another macro for selecting the last row +2 in
Column V, then summing the entire column within it. NOW, I figured I could
take that and pull a last row -9 from it and having it delete the entire row,
but I'm having some poor luck. I've managed to get it to delete everything
within the Column, but I can't seem to figure out how to make it get rid of
the rows.

Any ideas?


 
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
Deleting cells and shifting "right" CDWhite Excel Discussion (Misc queries) 5 April 15th 06 02:50 AM
Deleting contents of cells in non contiguous ranges Richard Buttrey Excel Worksheet Functions 9 April 1st 06 11:46 PM
Deleting a column reena Excel Discussion (Misc queries) 4 February 15th 06 06:45 AM
Scrolls Far Below Actual Data roadkill Excel Discussion (Misc queries) 5 September 21st 05 05:46 PM
How to delete duplicate records when I merge two lists (deleting . rinks Excel Worksheet Functions 10 December 11th 04 01:03 AM


All times are GMT +1. The time now is 05:30 AM.

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

About Us

"It's about Microsoft Excel"