Macro to select all the filled cells in a worksheet?

R

Rick Rothstein

Absolutely brilliant! I too share Clif's sentiments to you
regarding your contributions, and how much they have
helped me understand how to assemble some of my own.
Most inspiring to me is how your stuff MAKES me think
and learn. I'll be a committed fan forever...

Wow! Thank you for your nice comments. I am speechless. All I can say is
thank you so much. I am glad that you (and Clif and hopefully others) are
finding my postings to be helpful in your own VB coding efforts.

Rick Rothstein (MVP - Excel)
 
G

GS

Rick Rothstein wrote on 7/7/2011 :
Wow! Thank you for your nice comments. I am speechless. All I can say is
thank you so much. I am glad that you (and Clif and hopefully others) are
finding my postings to be helpful in your own VB coding efforts.

Rick Rothstein (MVP - Excel)

Well, I can't tell you exactly how many lines of comment in my projects
sasy this...

'by Rick Rothstein

but it's quite a few. You truly inspire me towards bettering my
programming skills however I can! Thanks so much for that
inspiration...
 
V

Victor Delta

Rick Rothstein said:
I'll just stick to Gord's macro for both Excel XP and 2003!

If I correctly understand what you want, then here is a one-liner (albeit
a long one) non-looping macro that I think does the same thing...

Sub PickedActualUsedRange()
Range("A1").Resize(Cells.Find(What:="*", SearchOrder:=xlRows, _
SearchDirection:=xlPrevious, LookIn:=xlValues).Row, _
Cells.Find(What:="*", SearchOrder:=xlByColumns, _
SearchDirection:=xlPrevious, LookIn:=xlValues).Column).Select
End Sub

Rick

Very many thanks. Just back after a couple of days away so will give it a
run tomorrow.

Thanks again,

V
 

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

Top