count number of cells contain logical values

Kwnstantinos_M

New Member
Joined
Jun 12, 2018
Messages
24
Hello

I have a column with logical values (true, false). I used countif command to count the number of those cells, but the outcome was zero..

The command I used is:

Code:
=COUNTIFS(R2:R5433;"TRUE";R2:R5433;"FALSE")

I also wrote the above command without the second criteria (for false) and I got an answer.. I seems to work for 1 criteria but not for two. Do you have any idea why?
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Try:


Excel 2010
I
105TRUE
1062
107TRUE
108FALSE
109TRUE
110FALSE
111TRUE
1121
113FALSE
114FALSE
115FALSE
116TRUE
117FALSE
1185
119TRUE
120
121
12212
Sheet1
Cell Formulas
RangeFormula
I122=SUMPRODUCT(0+ISLOGICAL(I105:I119))



=SUM(COUNTIF(I105:I119,{TRUE,FALSE}))

works too
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,157
Members
453,021
Latest member
Justyna P

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