Hello, I want to count the cells containing "TRUE" or "FALSE". Using COUNTIF function I can't do that. Based on the CRITERIA when there is TRUE or FALSE in a cell it simply doesn't count that cell.
Hello, I want to count the cells containing "TRUE" or "FALSE". Using COUNTIF function I can't do that. Based on the CRITERIA when there is TRUE or FALSE in a cell it simply doesn't count that cell.
afr_070 welcome to the forum.
That should work.
Copy and paste the actual formula(s) you are using into your next post. There may be a detail overlooked.
Dave
Dear Dave thanks. Please find below the table and function I tried.
Times access today
5
4
3
TRUE
2
7
FALSE
9
6
COUNTIF Function: COUNTIF(D4:D12,J6)
When I set criteria ">=1" then it shows 7. It ignores "TRUE" cell count. I also tried ISVALUE() and ISTEXT() function to check "TRUE" and "FALSE". In both cases, those functions return FALSE. But I want to count "TRUE" or "FALSE" cell as number as I know TRUE = 1 and FALSE = 0. Also when I tried to convert text to number using VALUE() function, it returns "#VALUE!" for both "TRUE" and "FALSE" cell.
Sorry for formatting to paste the code.
Try this:
=COUNT(SUMPRODUCT(--D4:D12>=1),D4:D12)
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
That is only true if TRUE / FALSE are coerced by mathematical operation or by preceding with "--" (double unary). Until then they remain text. Numeric functions ignore these by design.But I want to count "TRUE" or "FALSE" cell as number as I know TRUE = 1 and FALSE = 0.
Without seeing an uploaded Excel file (not pictures or screenshots) it is difficult to suggest alternatives without real data context.
If you do not know how to do this:
To attach a file to your post,
- be sure to desensitize the data
- click “Go Advanced” (next to Post Quick Reply – bottom right),
- scroll down until you see “Manage Attachments”, click that,
- click “Browse”.
- select your file(s)
- click “Upload”
- click “Close window”
- click “Submit Reply”
The file name will appear at the bottom of your reply.
See post #4.That is only true if TRUE / FALSE are coerced by mathematical operation or by preceding with "--" (double unary).
Last edited by AliGW; 09-06-2017 at 01:27 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks