Dynamic Print area vba code

Woody75

Board Regular
Joined
Feb 26, 2012
Messages
114
Hello Everyone:

I have ws containing two tables of info that is vlookup'd from a range in a separate ws. The amount of data within the tables varies depending on the value of a data validated cell. I have already done a simple macro to autofilter the sheet but i cannot get the print area sorted.

Each table contains 42 rows and 5 columns that can be filtered down to a min of 7 rows each (obviously depends on the amount of data that is vlookup'd), there is also text inbetween the tables.

Also, does anyone have a code for selecting the 1st, 2nd, 3rd, etc data value within the data validated cell?

I'm really a beginner in VBA, any help would be great.

Many Thanks

Woody
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Forum statistics

Threads
1,216,123
Messages
6,128,975
Members
449,480
Latest member
yesitisasport

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