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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I find move to the last cell that has data with Macro? 1

Status
Not open for further replies.

hneal98

Programmer
Aug 13, 2002
1,637
US
I need to create a macro that will always move to the last cell in a spreadsheet that has data. To give you an example, one time that last cell might be at row 15 and another at row 200 and another time at row 130, etc.

When I record a macro, it basically hardcodes the cell references, so the next time, it only goes that hardcoded cell reference.

Any help would be greatly apprectiated.

Thanks,

Harvard
 
Please look at FAQ707-2112 or FAQ707-2115 for tips on how to find the last row.

If you still have any questions after reading the FAQs, post this VBA/Macro specific question in forum707, the VBA Visual Basic for Applications (Microsoft) Forum.



[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top