find last row with data in it

  • Thread starter Thread starter johnb
  • Start date Start date
J

johnb

Hi all,

I have ssheet thats an daily output from a SAP system and
data is all over the place with many empty columns and
rows. The number of rows change daily and range from a
few hundred to 65000. I current use a For Next loop to
search to whole ssheet and its works fine. But
having "For 1 to 65536" seems a bit crude when there is
only a few hundred rows to read there must be a better
way. Advice welcome.

TIA
johnb
 
Rather use a macro that goes to the last row (65000), in the column you
prefer. Then do an <End><Up> to the last filled cell in that column.
 
--

HTH

RP
(remove nothere from the email address if mailing direct)
 
For i = 1 To Cells(Rows.Count,"A").End(xlUp).Row
....

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top