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

Question

Question

Calculation for Checked Checkbox fields total,

asked on July 25, 2023 Show version history

Hello, I have been trying to calculate the sum of these checkbox fields (Interest Rate Values) if they are checked, in a separate Post Judgment Interest rate field. Any help would be appreciated. Thanks

Consumer/Medical = 9

Statutory = 12

Contract = Must enter value

Current SumIf is not working - =SUMIF([Interest_Rate_Values.V_9,Interest_Rate_Values.V_12,Interest_Rate_Values._other]),Yes[Interest_Rate_Values.V_9,Interest_Rate_Values.V_12,Interest_Rate_Values._other_data])

 

0 0

Answer

SELECTED ANSWER
replied on July 25, 2023 Show version history

That's not how SUMIF works.  SUMIF is for tables, think of a spreadsheet for example.  It says something like "If column A equals X then sum the value from column B".

But in your case, you are wanting to get the value of the checkbox and sum it, and it's not in a table.  This is complicated by the fact that Forms is setting the values to start with V_ if they are a number.

I think your easiest solution is to use several IF statements that check is the box is marked and populate a value, or a zero if it's not checked.  And add those together.  Like this:

=IF(Interest_Rate_Values.V_9,9,0)+IF(Interest_Rate_Values.V_12,12,0)+IF(AND(Interest_Rate_Values._other,Checkbox._other_data<>""),Checkbox._other_data,0)

The downside with this, is that the other textbox doesn't have the ability to be limited to just a number, and if you put a letter in there, the field with the formula will show a formula error.  You could get around that by making a checkbox that says Other instead of the built-in other field, and use Field Rules to show a number field when it is marked - instead of the built-in other field.

0 0
replied on July 26, 2023

Thank you! That worked for me, I did have to adjust a little but not much at all.

 

I did try a similar attempt with multiple IF's but I kept getting a error about input parameters. I think that was because of the V_ and I had to add the ,9 or ,12 behind the value. 

 

Below is the final code I used. 

=IF(Interest_Rate_Values.V_9_,9,0)+IF(Interest_Rate_Values.V_12_,12,0)+IF(AND(Interest_Rate_Values._other<>""),Interest_Rate_Values._other_data,0)

=IF(Interest_Rate_Values.V_9_,9,0)+IF(Interest_Rate_Values.V_12_,12,0)+IF(AND(Interest_Rate_Values._other<>""),Interest_Rate_Values._other_data,0)

1 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.