Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default How do i delete all the rows lying below a cell.

I have a file that i get from client. On a daily basis, I have to
delete all the rows after the last value on the file. Means: if the
last number ends at B25, i will select all the rows from from 26 till
the end (like..65,500th row or whatever is the last) and then delete
everything. Although these rows are empty, i still have to delete those
in order to print only till B25.

How can i create a macro that will look for the last value and delete
all the rows lying below that (till the end).?

Please note that, it is not B25 all the time. It might end at D10 or
B15. anywhere. So this macro should check for values which is at the
most bottom of any columns.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 709
Default How do i delete all the rows lying below a cell.

Have a look here for ways to do it,

http://www.mvps.org/dmcritchie/excel/lastcell.htm

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"VB Script for Excel" wrote in message
oups.com...
I have a file that i get from client. On a daily basis, I have to
delete all the rows after the last value on the file. Means: if the
last number ends at B25, i will select all the rows from from 26 till
the end (like..65,500th row or whatever is the last) and then delete
everything. Although these rows are empty, i still have to delete those
in order to print only till B25.

How can i create a macro that will look for the last value and delete
all the rows lying below that (till the end).?

Please note that, it is not B25 all the time. It might end at D10 or
B15. anywhere. So this macro should check for values which is at the
most bottom of any columns.

Thanks



Reply
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
Delete rows on Cell wal50 Excel Discussion (Misc queries) 3 December 31st 07 12:52 PM
Why is XL lying to me?? KRAMER Excel Worksheet Functions 8 June 22nd 05 01:38 AM
delete all rows above a selected cell rroach[_4_] Excel Programming 2 June 13th 05 11:52 PM
Delete rows after used cell? JayL. Excel Programming 1 October 30th 03 07:23 AM
Delete Rows below a certain cell Julie[_6_] Excel Programming 7 October 29th 03 06:40 PM


All times are GMT +1. The time now is 05:35 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"