COUNTIFS - Not Counting

hmltnangel

Active Member
Joined
Aug 25, 2010
Messages
290
Office Version
  1. 365
Platform
  1. Windows
OK, so I know this is going to be one of those reallllllly silly errors Im making. But I cant see the wood for the trees.

I have a COUNTIFS, that I am asking to count the mount of times an Employee ID matches, and the amount of times a value matches another cell.

The employee id matches fine, but its not counting the cell match value. So, I broke it down and said a simple formula like this.

=IF([@Goal]=$U$8,"LV","") This simply has a blank for every answer. I suspect its the way the [@GOAL] Value is written in $U$8 as per below, or maybe the number of character at 1129?

BLAH BLAH -

blah blahblah:
Blah 1- blah blah.
blah 2 - blah blah.
blah 3 - blah blah.
blah 4 - blah blah.
blah 5 - blah blah.
blah 6 - blah blah

ANy ideas?
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
If you're trying to make partial matches as your example suggests might be the case then you need to use wildcards in COUNTIFS, or SEARCH with a simple IF formula.
Excel Formula:
=COUNTIFS([Goal],"*"&$U$8&"*")
Excel Formula:
=IF(ISNUMBER(SEARCH($U$8,[@Goal])),"LV","")
 
Upvote 0
Thanks, but the problem is - it should be an exact match. Thats why im stumped.

If the value in goal is an exact match to U8 - then show LV
 
Upvote 0
The full original formula is

=IF([@Emplid]="","",SUM(COUNTIFS([Employee ID],[Emplid],[Goals Entered],"Incomplete")-COUNTIFS([Employee ID],[Emplid],[Goal],$U$8)))

and its not subtracting the examples where Goal matches U8
 
Upvote 0
Noting that your profile says you're using office 2016, have you array confirmed the formula with Ctrl Shift Enter?

Alternatively, change SUM to SUMPRODUCT then it should work without array confirmation.

Note that you may need to use sumproduct twice to avoid conflicts between arrays.

Excel Formula:
=IF([@Emplid]="","",SUMPRODUCT(COUNTIFS([Employee ID],[Emplid],[Goals Entered],"Incomplete"))-SUMPRODUCT(COUNTIFS([Employee ID],[Emplid],[Goal],$U$8)))
 
Upvote 0
Reading post #1 again, I notice that you mentioned 1129 characters? Countifs has a limit of 255 characters per cell so you will likely need an alternative to get the correct results.

Is your profile up to date in that it is showing office 2016, or are you now using a different version?
 
Upvote 0
Solution
Yeah still on 2016 at the minute and No I didnt array confirm.

This gives me an answer that is definitely not correct - 2480 when it should be around 150approx.

Regardless, I found a workaround. I had a column elsewhere that I just altered the formula to show a specific value if the text matched U8. It works now and happy with it. I can count them easy :)
 
Upvote 0
The COUNTIFS 255 characters will be the issue. I kind of thought that sadly.
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

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