Quick help using sumproduct to count events of two criteria

Hollywoood

Board Regular
Joined
Aug 11, 2011
Messages
53
Hi Guys,

May just be too early for my brain to be working but I am getting a Div/0 error from the following forumla I am using.

=SUMPRODUCT(--(ISNUMBER(FIND(G19,$C$1:$C$522))),--($D$1:$D$522>0),--($D$1:$D$522<>""))

The goal is to locate the text in cell G19, in the Cells C1-C522 and if that text does exist, to count the occurences where the corresponding cell in column D is not null and is greater than 0.

The above works great if the cell in column D has a numerical value greater than 0 but if it is null or zero, I get a Div/0 error.

Any thoughts on what I may be missing or if my criteria is specified wrong?

Thanks
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
If you have a #DIV/0! error in any cell that the SUMPRODUCT formula references, that error will be reflected in the SUMPRODUCT formula.

Double check the values in columns C and D
 
Last edited:
Upvote 0
I've been trying to pinpoint the issue but its boiled down to there having to be a number greater than 0 in the corresponding cell in column D or the Div/0 happens. I would think my conditions would limit the forumla to ignore null cells or cell values of 0.
 
Upvote 0
Your formula works for me for what it's worth. Can't get it to error using 0 or blanks in column D.

Do you have formulas in columns C or D ?
 
Upvote 0
Managed to get it, Thanks Alpha. I wasnt looking to the results of other formulae when the null/0 event went into the cell. Changing the calculations for those eliminated other Div/0 errors in the range as you suggested and it cleared up.

thanks
 
Upvote 0

Forum statistics

Threads
1,224,552
Messages
6,179,487
Members
452,917
Latest member
MrsMSalt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top