Forum Discussion

Kirk1979's avatar
Kirk1979
Copper Contributor
Feb 14, 2020

COUNTIFS with multiple criteria across two sheets

I wonder if anybody could help me out with this problem please?

I would like to create a formula that counts multiple criteria over a number of cell ranges from another sheet. I cannot seem to able to get the formula quite right. 

The formula below works a treat because it is placed on the same worksheet. 

=SUMPRODUCT(COUNTIFS(C920:C2016,"SG",M920:M2016,">0",Q920:Q2016,">0"))

 

I have tried numerous different ways of trying to resolve this but with no luck.

The formula below was the latest attempt. 

=SUMPRODUCT(COUNTIFS(INDIRECT("'"&Q4&"'!C920:C2016),"SG",INDIRECT("'"&Q4&"'!M920:M2016),">0",INDIRECT("'"&Q4&"'!Q920:Q2016,">0"))

 

Where Q4 = cell with sheet name, which I am attempting to extract the information from.

If anybody has come across this and can point me in the right direction. It would be gratefully appreciated. 

 

Kirk 

Resources