Hello,
This is my first post to MrExcel, so please let me know how to improve my post if it is too detailed/not detailed enough or simply not clear. Thank you in advance for your help.
Contained in worksheet "SSU 1" I have built a table to pull and summarize information from a pivot table contained within the same workbook on another sheet ("PT"). The table looks something like this:
[TABLE="width: 500"]
<TBODY>[TR]
[TD][/TD]
[TD]Year 1
[/TD]
[TD]Year 2
[/TD]
[TD]Year 3
[/TD]
[/TR]
[TR]
[TD]Cost Type 1
[/TD]
[TD]*
[/TD]
[TD]*
[/TD]
[TD]*
[/TD]
[/TR]
[TR]
[TD]Cost Type 2
[/TD]
[TD]*
[/TD]
[TD]*
[/TD]
[TD]*
[/TD]
[/TR]
[TR]
[TD]Cost Type 3
[/TD]
[TD]*
[/TD]
[TD]*
[/TD]
[TD]*
[/TD]
[/TR]
</TBODY>[/TABLE]
Additional notes:
I am trying to builld a macro to do the following but do not know where to start:
This is my first post to MrExcel, so please let me know how to improve my post if it is too detailed/not detailed enough or simply not clear. Thank you in advance for your help.
Contained in worksheet "SSU 1" I have built a table to pull and summarize information from a pivot table contained within the same workbook on another sheet ("PT"). The table looks something like this:
[TABLE="width: 500"]
<TBODY>[TR]
[TD][/TD]
[TD]Year 1
[/TD]
[TD]Year 2
[/TD]
[TD]Year 3
[/TD]
[/TR]
[TR]
[TD]Cost Type 1
[/TD]
[TD]*
[/TD]
[TD]*
[/TD]
[TD]*
[/TD]
[/TR]
[TR]
[TD]Cost Type 2
[/TD]
[TD]*
[/TD]
[TD]*
[/TD]
[TD]*
[/TD]
[/TR]
[TR]
[TD]Cost Type 3
[/TD]
[TD]*
[/TD]
[TD]*
[/TD]
[TD]*
[/TD]
[/TR]
</TBODY>[/TABLE]
Additional notes:
- Cells identified above in the table with a "*" contain "GetPivotData" formulas with variables that look at the corresponding cost type and year.
- The Cost Types and Years will remain constant in all tables created by my request below.
- Also contained on the sheet titled "SSU 1" is a cell containing the worksheet name.
- I have a sheet called "SSU Listing", containing a list that goes from "SSU 1" to "SSU 15" (This list could change in length; at a later date, I might add an SSU 16).
I am trying to builld a macro to do the following but do not know where to start:
- I would like to take the sheet "SSU 1" and duplicate it for each SSU contained within the list on the sheet titled "SSU Listing".
- I would like each new sheet to be renamed for its corresponding SSU. (ie. "SSU 2", "SSU 3", "SSU 4", etc.)
- Anything in the original sheet which is formula based, I would like it to keep formula based. A few specific formulas I am using within this sheet include:
- I have cells that are set to display the worksheet name (using a formula built with VBA)
- I have cells which perform a vlookups on data contained in the "SSU Listing" tab.
- I have cells containing "GetPivotData" fields based on variable items.
- I have cells with simple functions such as sums.