Link to home
Start Free TrialLog in
Avatar of thutchinson
thutchinsonFlag for United States of America

asked on

VBA Select Range when rows and columns are dynamic

I would like to create a macro that will select the range based on the following:
1) Upper left is determined by wherever the curser is placed when the macro is executed.
2) Lower right is determined by last row with data in COL A and last column with a header.

The macro will be executed on the active worksheet in whatever workbook is open.

For example, this code gives me lots of empty records:     Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select

Thanks for your help, Experts!
ASKER CERTIFIED SOLUTION
Avatar of Norie
Norie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thutchinson

ASKER

That's fantastic.  Thanks very much.
Quick reply, great answer. in a word, "Perfect!"