COUNTIFS not capturing data

datadummy

Active Member
Joined
Mar 16, 2017
Messages
312
Office Version
  1. 365
Platform
  1. Windows
I have the following formula COUNTIFS('Foley Bundle'!$A:$A,">2/28/2017",'Foley Bundle'!$A:$A,"<4/1/2017",'Foley Bundle'!$B:$B,"CCU",'Foley Bundle'!C:C,"Y") that is not capturing the data that it should. This formula has been in place for about 6 months and started missing data in January and now won't capture the data at all. Also I have other cells with the exact formula except where it reads "CCU" there are other names in the quotes and those are working properly so I am totally stumped on why this one isn't working.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Since you are saying that the formula works with criteria other than "CCU", let's (for now) assume that is the problem and go from there.

Does =COUNTIF('Foley Bundle'!$B:$B,"CCU") return the correct number of "CCU" rows in column B?

If not, it is possible that there are trailing or leading spaces or other characters besides just "CCU" in the cell? For example, maybe the cells show " CCU" or "CCU ".

To test if this is the case, try adding wildcards around CCU in your formula and see if it picks them up.

"*CCU*"
 
Upvote 0
Since you are saying that the formula works with criteria other than "CCU", let's (for now) assume that is the problem and go from there.

Does =COUNTIF('Foley Bundle'!$B:$B,"CCU") return the correct number of "CCU" rows in column B?

If not, it is possible that there are trailing or leading spaces or other characters besides just "CCU" in the cell? For example, maybe the cells show " CCU" or "CCU ".

To test if this is the case, try adding wildcards around CCU in your formula and see if it picks them up.

"*CCU*"

BOOM! That did the trick, thanks for the help!! Question, any idea how this may be occurring when the cell where CCU is being entered is coming from a drop down, so shouldn't all the entries be uniform? My only thought is we have a culprit who may be free texting CCU.
 
Upvote 0
How is that drop down populated, is it data validatoin?
Can you post the contents of the source box?
 
Upvote 0
BOOM! That did the trick, thanks for the help!! Question, any idea how this may be occurring when the cell where CCU is being entered is coming from a drop down, so shouldn't all the entries be uniform? My only thought is we have a culprit who may be free texting CCU.

Great! Now that we found the issue, let's work on correcting it.

First thing that I would check is the drop down value itself. Make sure that it does not have any spaces around "CCU".
 
Upvote 0
How is that drop down populated, is it data validatoin?
Can you post the contents of the source box?

Yes the drop down is populated via data validation and after reviewing it I believe I may have found the problem, an added space after the unit name.
 
Upvote 0
I think that was the issue after looking at my data validation list it appeared there was a space after CCU and not the other unit names. Thanks for walking me through that, totally saved a lot of rework!!
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,458
Members
449,085
Latest member
ExcelError

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