It can't hurt!
Give it a go, and we'll see.
It can't hurt!
Give it a go, and we'll see.
The numbers are of course random![]()
If you want to shorten by getting rid of the long "array constant" with the sheet names then one way is to list the sheet names somewhere on your sheet, e.g. in Z2:Z13, and then name that range Sheetlist and use this formula
=SUMPRODUCT(SUMIF(INDIRECT("'"&Sheetlist&"'!B:B"),$B7,INDIRECT("'"&Sheetlist&"'!"& ADDRESS(1,COLUMN())&":"&ADDRESS(20000,COLUMN()))))
alternatively you could use a formula to generate the month names, e.g.
=SUM(SUMIF(INDIRECT(TEXT({1,2,3,4,5,6,7,8,9,10,11,12}*29,"'mmmm'!")&"B:B"),$B7,INDIRECT(TEXT({1,2,3,4,5,6,7,8,9,10,11,12}*29,"'mmmm'!")&ADDRESS(1,COLUMN())&":"&ADDRESS(20000,COLUMN()))))
....and using the first version with a simplification of the ADDRESS part....
=SUMPRODUCT(SUMIF(INDIRECT("'"&Sheetlist&"'!B:B"),$B7,INDIRECT("'"&Sheetlist&"'!"& CELL("address",INDEX(1:20000,0,COLUMN())))))
Last edited by daddylonglegs; 06-17-2011 at 09:54 AM.
Audere est facere
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks