COUNTIF = "True" as string, not boolean

STEVEMILLS04

Board Regular
Joined
Oct 8, 2009
Messages
113
I run a report from our HR system that outputs a True/False column as a string (verified using =TYPE() formula). When attempting to do the countif formula below on the column it does not count them:

Code:
=COUNTIF(TermList[Is Voluntary?],"False")

It works when I change the column to a Boolean and change the formula to FALSE rather than "False" but this would not be my preferred method because I don't want to have to edit the column every time I run the report.

Any tips?
 
Last edited:
Although, despite your desire to not have to manipulate data.
I still recommend converting those textual true/false to real Boolean.
You may likely have need for other formulas in the future to refer to them.
It's usually best to fix a problem at it's source, rather than work around it.

Maybe you can look at the report that puts those true false values there as strings in the first place, maybe that process can be adjusted
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Thanks Jack, I should have mentioned that my formula is actually a much longer IF/COUNTIFS formula:

=IF(Month>=C2,COUNTIFS(TermList[Location ID],$A2,TermList[Job Title],$D2,TermList[Term Month],MONTH($C2),TermList[Term Year],YEAR($C2),TermList[Is Voluntary?],"False"),0)
If you could have other values besides True/False (for example, Falsehood, False Vote, etc.), then try changing the "False" section to this...

TermList[Is Voluntary?],"Fals*",TermList[Is Voluntary?],"????e"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,522
Messages
6,131,146
Members
449,626
Latest member
Stormythebandit

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