Macro to change print settings based on condition.

boweryreserve

New Member
Joined
Feb 10, 2014
Messages
19
Hello. I am pretty new to Visual Basic. I am trying to write a macro that will automatically adjust the print settings in a document based on the value in column 20 (column T) being = "Show". I am building a template where users will enter information. There will an adjacent worksheet that will summarize that information. Rather than having a user adjust the print settings manually, I want the macro to automatically adjust to include all rows where the cell = "Show". Below is a mini example of what the worksheet will look like. Thanks very much for your help.
1234567891011121314151617181920
Project Name/DescriptionShow
Project 1 0.12 0.13 0.99 0.29 0.10 0.28 0.18 0.87 0.19 0.37 0.14 (0.81) 0.58 0.09 Show
Project 2 0.97 0.30 0.29 0.41 0.97 0.60 0.24 0.39 0.82 0.66 0.31 (0.05) (0.03) (0.15)Show
Project 3 0.86 0.80 0.68 0.94 0.01 0.47 0.64 0.67 0.42 0.85 (0.33) (0.04) (0.27) 0.41 Show
Project 4 0.12 0.52 0.67 0.90 0.30 0.55 0.88 0.05 0.24 0.31 0.02 0.21 (0.84) (0.06)Show
Project 5 0.36 0.47 0.04 0.62 0.96 0.50 0.38 0.36 0.59 0.80 0.03 0.34 (0.26) (0.38)Show
Project 6 0.74 0.54 0.81 0.52 0.09 0.94 0.91 0.09 0.54 0.03 0.40 0.11 (0.43) 0.45 Show
Project 7 0.77 0.52 0.74 0.33 0.02 0.16 0.06 0.92 0.27 0.75 (0.36) (0.68) 0.58 0.26 Show
Project 8 0.70 0.66 0.68 0.74 0.71 0.02 0.87 0.51 0.18 0.07 (0.64) 0.19 (0.23) (0.53)Show
Project 9 0.39 0.96 0.83 0.04 0.19 0.12 0.76 0.76 0.66 0.27 (0.83) (0.07) 0.72 0.47 Show
Project 10 0.05 0.94 0.02 0.35 0.04 0.44 0.85 0.16 0.39 0.97 (0.50) 0.83 (0.19) 0.35 Show
Project 11 0.34 0.29 0.98 0.60 0.38 0.65 0.69 0.56 0.63 0.64 0.37 (0.29) (0.05) 0.25 Show

<tbody>
</tbody><colgroup><col><col span="19"></colgroup>

<tbody>
</tbody>
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I just thought of some more information that may provide some insight into what I'm trying to do. The print range will be A1:T15. But if someone enters data in rows 16 and 17, I want the macro to change the print range to A1:T17. Column T will automatically say "Show" if data is populated in the row. So I need the macro to somehow change the end of the print range to the maximum row (always column T) where the column T(row number) = "Show". Thanks for your help.
 
Upvote 0

Forum statistics

Threads
1,215,443
Messages
6,124,890
Members
449,194
Latest member
JayEggleton

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