Edward S wrote...
I picked up this Formula from the Excel newsgroup, I need to
add at least 2 more criteria to the formula so in total 3 Criterias
For example:
If Phase"&{1,2,3}&"!B1:B146")=B4
and Phase"&{1,2,3}&"!C1:C146")=C4
and Phase"&{1,2,3}&"!E2:BY2"),E3
then Sum the range within the multiple sheets
=SUMPRODUCT(SUMIF(INDIRECT("Phase"&{1,2,3}
&"!B1:B146"),B4,INDIRECT("Phase"&{1,2,3}&"!E4:BY146")))
...
There are a few problems with this sample formula, but the main one i
that the criteria range is B1:B146 ignoring worksheets while the resul
range is E4:BY146. That the former is a single column while the latte
spans 73 columns is not a big deal, but the former spans 146 rows whil
the latter spans only 143 rows. That can't be accomodated. Either rang
could span a single column or a single row, but when either span
multiple rows or columns, the other *must* either a single row o
column or the same number of rows or columns.
Anyway, the trick to doing this is that you need to convert you
criteria and values into 2D ranges, and INDIRECT and OFFSET are th
only functions that help with this, though both must be wrapped insid
either N() or T(). In your case, I believe you could use
=SUMPRODUCT(
(N(INDIRECT("'Phase"&(1+INT((ROW(INDIRECT("1:438"))-1)/146))
&"'!B"&(1+MOD(ROW(INDIRECT("1:438"))-1,146))))=B4)*
(N(INDIRECT("'Phase"&(1+INT((ROW(INDIRECT("1:438"))-1)/146))
&"'!C"&(1+MOD(ROW(INDIRECT("1:438"))-1,146))))=C4)*
(N(INDIRECT("'Phase"&(1+INT((ROW(INDIRECT("1:438"))-1)/146))
&"'!R2C"&COLUMN(INDIRECT("E:BY")),0))=E3),
N(INDIRECT("'Phase"&(1+INT((ROW(INDIRECT("1:438"))-1)/146))
&"'!R"&(1+MOD(ROW(INDIRECT("1:438"))-1,146))&"C"
&COLUMN(INDIRECT("E:BY")),0))
)
I did test this, but on a smaller 3-worksheet block of cells. I'
assuming all your criteria cells are numeric, so wrapping them insid
N(). If any are text, change N() to T() for those criteria