![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Tulsa, OK
Posts: 354
|
I have a range with data in range A1:H20. I am trying to make a macro which will select this range which may have rows added to it, but never columns added to it. (i.e, it’ll always start with A1 and end with column H, but the last row may changes).
Is there a way to write a marco to do this? And then once it’s selected that range, I want to be able to Copy it or Make it the Print Area. THANKS! |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Winnipeg
Posts: 2,330
|
Quote:
Range("A1", Range("H65536").End(xlUp).Address).Copy You'll just have to put in where you want to paste it. You can use variations of that to select and/or set print area. Hope this helps,
__________________
Barrie Davidson "You're only given a little spark of madness. You mustn't lose it." - Robin Williams |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|