Annelies
Programmer
- Nov 25, 2001
- 72
Hi,
I have a workbook into which a various number of worksheets will be copied. These worksheets will be named "BU-*" (the * being a different name for each sheet).
I want, on a summary page, for the formulas to sum a cell value on each of these sheets. The complex part is that at the time of creating the workbook, we do not know
a) how many sheets will be copied in (via VBA code)
b) what exactly they will be called (apart from starting with BU-
My question is:
Can I set up the formula's so that they sum, for example, cell A1 of each sheet starting with BU-. Will this require VBA code (I'm thinking of an IF statement - ie, IF worksheet name starts with BU- then formula = formula+[ThisWorksheetsName]!A1) or is there an easier way?
I hope I haven't overcomplicated the question!
Thanks in advance for your help!
Annelies
I have a workbook into which a various number of worksheets will be copied. These worksheets will be named "BU-*" (the * being a different name for each sheet).
I want, on a summary page, for the formulas to sum a cell value on each of these sheets. The complex part is that at the time of creating the workbook, we do not know
a) how many sheets will be copied in (via VBA code)
b) what exactly they will be called (apart from starting with BU-
My question is:
Can I set up the formula's so that they sum, for example, cell A1 of each sheet starting with BU-. Will this require VBA code (I'm thinking of an IF statement - ie, IF worksheet name starts with BU- then formula = formula+[ThisWorksheetsName]!A1) or is there an easier way?
I hope I haven't overcomplicated the question!
Thanks in advance for your help!
Annelies