SUMIF across multiple worksheets

F

Fgbdrum

Is it possible to have a SUMIF formula across multiple worksheets? If so,
how? Thank you.
 
F

Fgbdrum

On my "total" worksheet, I have a set of numbers in Column A.

These numbers appear in column A of 25 other worksheets as well. However, in
column B of these 25 other worksheets appear unique corresponding numbers. I
want to sum these unique numbers that appear in these 25 worksheets in column
B of my "total" worksheet using a sumif formula.
 
B

Biff

If your sheet names follow some kind of pattern/sequence like the default
sheet names: Sheet2, Sheet3, Sheet4...Sheet25:

=SUMPRODUCT(SUMIF(INDIRECT("'Sheet"&ROW(INDIRECT("2:25"))&"'!A1:A10"),A1,INDIRECT("'Sheet"&ROW(INDIRECT("2:25"))&"'!B1:B10")))

If your sheet names are unique like Alaska, Alabama, Arizona:

You have to list the sheet names in a range of cells, say, H1:H25, then:

=SUMPRODUCT(SUMIF(INDIRECT("'"&H$1:H$25&"'!A1:A10"),A1,INDIRECT("'"&H$1:H$25&"'!B1:B10")))

Both formulas do the same thing:
Sumif(Sheet_names!A1:A10,A1,Sheet_names!B1:B10) then Sumproduct adds them
all up.

Biff
 
F

Fgbdrum

Biff,

Just wanted to thank you for taking the time. It worked out great. Thanks
again.

Fabio
 
Top