View Single Post
  #3   Report Post  
Don Guillett
 
Posts: n/a
Default Macro Help In Excel

As always, post your code for comments but to find the last row in col A

lastrow=cells(rows.count,"a").end(xlup).row
for i=2 to lastrow
your stuff
next i
--
Don Guillett
SalesAid Software

"welshlad" wrote in message
...

Every morning we have a file imported containing rows of data. There are
a different amount of entries every day. I have managed to set up a
macro that goes through each row individually highlighting it and
printing it off. Therefore, if I have an import with 20 rows, my macro
prints off 20 copies, with each row individually being highlighted.

My problem is that I can only do this if I firstly enter into the macro
how many rows of data there are. Is there any way the macro can work
through the rows, and know when to stop?

Any advice will be gratefully received.


--
welshlad