You are viewing limited content. For full access, please sign in.

Question

Question

Using a formula to count checkboxes

asked on March 13, 2020 Show version history

I would like to be able to count how many checkboxes are selected in a form. I will than use this value to calculate a cost for a permit.

What I am hoping to find a formula that will count if a checkbox is checked to give me a number for further calculation.

I found something similar in the "CSS, JavaScript, and Formula Examples:" but have not successfully modified it for my use. I have tried COUNT, COUNTIF, and SUMIF.

Thank you.

Capture.jpg
Capture.jpg (150.63 KB)
1 0

Answer

APPROVED ANSWER SELECTED ANSWER
replied on March 13, 2020

Hi Duane

In Forms Calculations, a Checkbox is seen as either TRUE or FALSE based on if selected or not

You can count how many boxes are checked using the following

In this example, My Checkbox field is called "Checkbox1" and the .V_1, 2, etc represented each of the Selection values. I would suggest you use the Token Selector to chose your fields in the formula

=COUNTIF([Checkbox1.V_1,Checkbox1.V_2,Checkbox1.V_3,Checkbox1.V_4],"TRUE")

6 0
replied on March 13, 2020

Thank you Steve

That is what I was looking for

1 0
replied on April 20, 2021

Thank you too Steve!

This worked perfectly for me!  I was needing to determine what a prorated amount would be for licensing purposes.  I had a checkbox field listing all the months in a year.  Needed to have the number months selected and that number used as a multiplier for the total monthly fee to determine prorated cost of a license.  Please forgive the different ways I have spelled "prorated" in the screen shots....I do plan to fix that.

I would recommend adding Steve's option above to some of the other postings on Calculating the total number of checkboxes. 

Christine

 

__________________________________________________________________________________________

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.