Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Excel Last record

Status
Not open for further replies.

strangeBrew12

Programmer
Apr 5, 2006
18
US
I want to be able to find where the last cell that has data in it using a macro. Similar to using the <Ctrl> <End> key combination.

I would like to select a starting point and then go to the end of the data set. It will span multiple columns and the rows will vary each time.

Thanks

JJ
 
At least two FAQs in this forum cover this subject.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
How is your "data" laid out. How will you identify what constitutes the last cell with data?

In other words
A B C D
1 2 3
6 7 8 8

As from the example above, The first row is missing data in column d. We would need some way of id'ing what is actually data and what is not.

This problem can easily be solved with basic looping and dynamically asking for the width of the data.

I guess I am asking for more information and an example of your data.


Andy Baldwin

"Testing is the most overlooked programming language on the books!
 
In case anyone else decides to look this up, the faq for this forum to check is faq707-2115

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top