IF SUMPRODUCT COUNTIFF are giving me the wrong answer

lmcc007

New Member
Joined
Sep 9, 2018
Messages
35
A dummy/newbie needs some help.

My code is not working properly. After manually checking, I see that my code is not working. I can’t figure out what’s wrong.

I am trying to do the following:

1. I am looking at C1:F10 for duplicate numbers.

2. If the cells have one of the following numbers, do not count them—just ignore them:

4, 6, 15, 19, 25, 27, 30, and 33​

3. I am looking for duplicates that appear three or more times.

4. If three or more duplicates are found, put “Hot,” and if not put “NH”


Code:
=IF(SUMPRODUCT(COUNTIFS($C1:$F10,"<>4",$C1:$F10,"<>6",$C1:$F10,"<>15",$C1:$F10,"<>19",$C1:$F10,"<>25",$C1:$F10,"<>27",$C1:$F10,"<>30",$C1:$F10,"<>33")-2)>0, "Hot", "NH")

Thanks!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi, welcome to the forum.
Use a helper column and do the sum there
in this helper column you do the calculations and exceptions and the sum of that column is the result.
If you want more explanation, attach a dummy file with non-private non-sensitive data, makes it easier to work with what YOU have than to invent something.
 
Last edited:
Upvote 0
You cannot upload files to this site, but there are tools available to enable you to post sample data to the thread.
You can find a link to those tools in my signature
 
Upvote 0
Yeah I forgot that this site is not as the others.
Not my favourite either

I think there is a problem with If(SumProduct... because when tested the CountIf by it self (see below), it works and give me an accurate answer.


COUNTIFS($C1:$F10,"<>4",$C1:$F10,"<>6",$C1:$F10,"<>15",$C1:$F10,"<>19",$C1:$F10,"<>25",$C1:$F10,"<>27",$C1:$F10,"<>30",$C1:$F10,"<>33")</pre>
But I still need to say that if a number appears three or more times put "Hot" and if not "NH".
 
Upvote 0
Control+shift+enter, not just enter:

=IF(MAX(FREQUENCY(IF(ISNA(MATCH($C$1:$F$10,{4;6;15;19;25;27;30;33},0)),IF(ISNUMBER($C$1:$F$10),$C$1:$F$10)),$C$1:$F$10))>=3,"Hot","NH")

Hope this is what you want.
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,725
Members
448,987
Latest member
marion_davis

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