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

Question

Question

Calculation based on radio button choice

asked on May 21, 2021

I have a scenario where a number of hours will be entered in the Hours field, then when a minimum hours choice is made, a formula would add either 2.00, 3.00, or 0.00 and populate the Total Hours field.

I've been fiddling around with this formula, with no luck:

=IF(OR(Minimum_Hours="Hours2",Minimum_Hours="Hours3",Minimum_Hours="Hours0"),
(SUM(Hours_Worked), 2.00),
(SUM(Hours_Worked), 3.00),
(SUM(Hours_Worked), 0.00),
)

Any advice appreciated. Thank you.

 

0 0

Answer

SELECTED ANSWER
replied on May 24, 2021

Are you trying to add that top Hours fields to 2, 3 or 0? If so, you can try this:

=SUM(Hours_Worked,IF(Minimum_Hours="Hours2",2,IF(Minimum_Hours="Hours3",3,0)))

This will take the sum of hours worked plus 2 or 3 or 0 depending on the value of minimum hours. 

0 0

Replies

replied on May 21, 2021

Try something like

=IF(Minimum_Hours="Hours2",2,IF(Minimum_Hours="Hours3",3,0))

If minimum hours is Hours2, put in the value 2, otherwise if minimum hours is Hours2, put in 3, otherwise put 0. 

0 0
replied on May 24, 2021

Thanks so much, Jared. I then tried adding a simple SUM statement to your statement in order to add Hours_Worked and Minimum_Hours together, but no go. What further am I missing?

0 0
replied on May 24, 2021

YES - thank you!

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

Sign in to reply to this post.