Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code to create "variable" worksheets within a workbook
I have a need for a user to be able to create a new worksheet that
essentially is the combination of two or more sheets already contained within the workbook. For instance, I have 100 sheets within a workbook (all formatting, columns, rows are identical, but the data contained within is unique)...I want to be able to create a user interface using VBA that allows a user to be able to pick and choose any number of the 100 sheets available, hit the OK button and VBA creates a new worksheet that adds up the data within the selected sheets. The new worksheet would be a template of sorts and the code behind it would just add various cells together and populate this new sheet. Any thoughts or suggestions? Thanks, Chris |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VBA code to create "variable" worksheets within a workbook
Does this mean you'll be adding cell D92 of all those selected worksheets?
If yes, how about an alternative? Create three worksheets. 1. Name it summary (and make it the far left worksheet) 2. Name it Start (and put it anywhere) 3. Name it End (and put it to the right of Start) On the summary worksheet: Fill up with formulas like: =sum(start:end!a1) Now all the user has to do is drag the worksheets they want in between Start and End (or move Start and End). ======== If your cells to add vary depending on worksheets, then you'll have to provide some more info. Chris wrote: I have a need for a user to be able to create a new worksheet that essentially is the combination of two or more sheets already contained within the workbook. For instance, I have 100 sheets within a workbook (all formatting, columns, rows are identical, but the data contained within is unique)...I want to be able to create a user interface using VBA that allows a user to be able to pick and choose any number of the 100 sheets available, hit the OK button and VBA creates a new worksheet that adds up the data within the selected sheets. The new worksheet would be a template of sorts and the code behind it would just add various cells together and populate this new sheet. Any thoughts or suggestions? Thanks, Chris -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
create a "variable array?" to report data | Excel Discussion (Misc queries) | |||
"Type mismatch" when I try to fill an Array variable with "+" | Excel Discussion (Misc queries) | |||
cannot use "Create List" and "Share Workbook" same time | Excel Discussion (Misc queries) | |||
create links to check boxes marked "good" fair"and "bad" | Excel Worksheet Functions |