Macro to create "Print Area" based on new row /ran

ilcaa

Well-known Member
Joined
May 25, 2005
Messages
751
Office Version
  1. 365
Platform
  1. Windows
Hi I am trying to create a macro that will automatically highlights my current range (its dynamic and changes based on subtotals i select) and make it my "Print Area"

what i do now is; select g1:a1**, then shift&Ctrl&down arrow

**Note- I select g1 first, then though a1 because i have a continous column in G and not in a, so this allows me to select the entire range when i shift,ctrl, arrow down..**

the problem is..when i look at the macro its has a1:g37 as the print area (based on that particular sized range at that moment i created the macro)

I need something that can select my current range (whatever it is at the time and make THAT my new print area when i run this macro

any ideas. thanks. Max
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
the part that i make it a print area is the easy one, all i do if go to file select "set as print area"


tha problem i am having is slecting the range as my print area, please read the post, i think you only read the title of my post. thanks
 
Upvote 0

Forum statistics

Threads
1,213,553
Messages
6,114,279
Members
448,562
Latest member
Flashbond

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top