Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
johnb
 
Posts: n/a
Default find last row with data in it

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
  #2   Report Post  
Kassie
 
Posts: n/a
Default

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.

"johnb" wrote:

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

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default



--

HTH

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


"Kassie" wrote in message
...
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.

"johnb" wrote:

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



  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default


For i = 1 To Cells(Rows.Count,"A").End(xlUp).Row
....

--

HTH

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


"johnb" wrote in message
...
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



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
How do I compare data in two worksheets to find matching cells? Gary Excel Discussion (Misc queries) 4 March 2nd 06 09:04 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Find repeted data??? kiran Excel Discussion (Misc queries) 2 December 14th 04 10:31 AM
Another question on how to find duplicate data Eroc Excel Worksheet Functions 2 December 14th 04 05:03 AM
I need a macro to find cut and paste data to new cell Rex Excel Discussion (Misc queries) 0 December 6th 04 12:45 AM


All times are GMT +1. The time now is 05:10 PM.

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"