View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
VB Script for Excel VB Script for Excel is offline
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