Macro to change a cell's value to that of a named range and then save as PDF?

chris_huh

New Member
Joined
Aug 4, 2011
Messages
26
Hi,

I am trying to set up a macro to run some batch operations.

What I have is a workbook with a lot of half hourly data from electricity and gas meters for 17 buildings. Cell C1 of the "1MonthlyProfile" sheet has a data validation list linked to the list of buildings (in a named range of "Buildinglist"). So you change that cell's value and the workbook will select the data for that building, drawing graphs, doing calculations, etc.

What I am looking for is to create a macro which will change the value of C1 to the first item in the "Buildinglist" range, then activate two sheets ("1MonthlyProfile" and "1hrratekwhprfilmth") and save them as a PDF. Then it to move to the second item in the "Buildinglist" range, save as PDF, then the 3rd, 4th, etc. Preferably to the last item, as it might increase from 17.

Is this possible?


Thanks guys
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,224,613
Messages
6,179,894
Members
452,948
Latest member
Dupuhini

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