please help getting this excel formula right [counting checked boxes]

Copper Contributor

Hi there, could someone help me out here:

I created a list in excel with check boxes and would like to count only the checked boxes. Now here's the problem with the boxes as they are shown as "true" for a checked box and false for an empty box, but the formula =COUNTIF(A2:A5,"true") won't count the checked ones. It displays "0" even though some boxes are checked. It's a small detail but would make things so much easier. Thank you for any hints

Kind regards

5 Replies

@Lenabrandecker 

Make sure you are counting the True instances for the cells which are linked to the CheckBoxes and as per your formula A2:A5 should be linked to the four CheckBoxes. Check linked cell property for each CheckBox and see if they are linked to the correct cells.

Hi @Lenabrandecker 

 

I believe you formatted the checkbox to determine which cells the values will be linked to as highlighted below:

 

wumolad_0-1591353741624.png

 

In my case, the values based on checkbox selection are reported in cells M1 to M6, hence, the formula I used was based on the TRUE/FALSE reported based on checking or unchecking the boxes.

 

The formula used was 

 

 

=COUNTIF(M1:M6,TRUE)

 

 

See attached the worksheet for guidance and do let me know if any clarification is required.

 

Note that in your own case, if you still want to use A2 to A5 in your formula, ensure the checkboxes are linked to the cells.

 

Cheers

 

Emmanuel

@wumoladThanks a lot for your detailed response. I ran over it and noticed the problem was language based. The formula of the box when checked was displayed in german language " WAHR", as is the formula's beginning "ZÄHLENWENN" but it only works if I fill in the english property "TRUE" instead of the german word. So eventually [ =ZÄHLENWENN(B2:B26;"TRUE"] works. Also I should mention this happened in google drive, while editing a sheet online. Thanks again!

@Subodh_Tiwari_sktneerthanks a lot. I could solve it by changing the language of parts of the formula (see above).

@Lenabrandecker 

No problem! Glad your issue has been resolved.