sumproduct with indirect

  • Thread starter BNT1 via OfficeKB.com
  • Start date
B

BNT1 via OfficeKB.com

Hi

With the help Pete UK of an earlier thread used the following formula

sumproduct(--(sheetname!A1:a20="GA01")--(sheetname!B1:b20=105))

What I now want to do is use the indirect function with sumproduct in a
summary sheet

sumproduct(--(""&c1&"!A1:a20,a6)--indirect(""&c1"!b1:b20=105

Cell A6 contains the first criteria (GA01)
Cell C1 contains the shhet name


Help would be appriciated as it is not working !

Brian
 
V

vezerid

=SUMPRODUCT((INDIRECT("'"&C1&"'!A1:A20")="GA01")*(INDIRECT("'"&C1&"'!
B1:B20")=105))

HTH
Kostis Vezerides
 
B

BNT1 via OfficeKB.com

thanks Kostis

yes, it works ok,
However, I want the first criteria "GA01" to refer to cell A6, this way i
will drag down into other cells

any idea's

regards
=SUMPRODUCT((INDIRECT("'"&C1&"'!A1:A20")="GA01")*(INDIRECT("'"&C1&"'!
B1:B20")=105))

HTH
Kostis Vezerides
[quoted text clipped - 16 lines]
 
V

vezerid

Simply replace ="GA01" with A6. It is not part of the INDIRECT.

=SUMPRODUCT((INDIRECT("'"&C1&"'!A1:A20")=A6)*(INDIRECT("'"&C1&"'!
B1:B20")=A7))

Regards
Kostis

thanks Kostis

yes, it works ok,
However, I want the first criteria "GA01" to refer to cell A6, this way i
will drag down into other cells

any idea's

regards
=SUMPRODUCT((INDIRECT("'"&C1&"'!A1:A20")="GA01")*(INDIRECT("'"&C1&"'!
B1:B20")=105))
HTH
Kostis Vezerides
[quoted text clipped - 16 lines]
 
B

BNT1 via OfficeKB.com

thanks Kostis for the speedy response,

worked a treat

regards
Simply replace ="GA01" with A6. It is not part of the INDIRECT.

=SUMPRODUCT((INDIRECT("'"&C1&"'!A1:A20")=A6)*(INDIRECT("'"&C1&"'!
B1:B20")=A7))

Regards
Kostis
thanks Kostis
[quoted text clipped - 20 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top