Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
-- 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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I compare data in two worksheets to find matching cells? | Excel Discussion (Misc queries) | |||
Pulling data from 1 sheet to another | Excel Worksheet Functions | |||
Find repeted data??? | Excel Discussion (Misc queries) | |||
Another question on how to find duplicate data | Excel Worksheet Functions | |||
I need a macro to find cut and paste data to new cell | Excel Discussion (Misc queries) |