hlwilliams
New Member
- Joined
- Oct 24, 2013
- Messages
- 2
1st post ever so be kind please.
I created a macro that asks the user how many test forms they need of one type of test, then how many they need of another and so forth. When complete the macro spits out a workbook with X number of worksheet "Cats 01","Cats 02" and so forth, and then Y number of "Dogs 01',"Dogs 02" and so forth. So far that chunk works like a champ. Now I need a summary sheet of all the data across the workbook, regardless of the # of worksheets there are which is what is confusing me.
For example I want to sum cell A3 through the X number of the "Cat XX" worksheets, but since the number of worksheets is variable, I am not sure how to express what I need in a formula or vba. Then I would need to average cell B2 throughout the Y number of "Dogs XX" sheets, again being a variable number.
I was trying to figure out how to used a named range as an array, then looking for left(workbookname,3) = cat or what have you to sum/average the cells across the sheets, but I am still running in circles.
I was able to create a named range "SheetNames" and then created a tab that lists all of the possible names in the workbook to start with, and now I am lost.
I am a excel/vba noob so please be kind and I apologize if I am unclear. I've seen sumproduct(sumif(indirect....) but these formulas are a little greek to me still.
Thanks in advance!!
I created a macro that asks the user how many test forms they need of one type of test, then how many they need of another and so forth. When complete the macro spits out a workbook with X number of worksheet "Cats 01","Cats 02" and so forth, and then Y number of "Dogs 01',"Dogs 02" and so forth. So far that chunk works like a champ. Now I need a summary sheet of all the data across the workbook, regardless of the # of worksheets there are which is what is confusing me.
For example I want to sum cell A3 through the X number of the "Cat XX" worksheets, but since the number of worksheets is variable, I am not sure how to express what I need in a formula or vba. Then I would need to average cell B2 throughout the Y number of "Dogs XX" sheets, again being a variable number.
I was trying to figure out how to used a named range as an array, then looking for left(workbookname,3) = cat or what have you to sum/average the cells across the sheets, but I am still running in circles.
I was able to create a named range "SheetNames" and then created a tab that lists all of the possible names in the workbook to start with, and now I am lost.
I am a excel/vba noob so please be kind and I apologize if I am unclear. I've seen sumproduct(sumif(indirect....) but these formulas are a little greek to me still.
Thanks in advance!!