# If then statement help for accrual cap

1. ## If then statement help for accrual cap

I have the following calculation to calculate the number of days available to a person for vacation leave.
I17 is previous total, C18 is the new accrued amount, and F18 is the amount of time used.

I want the new answer to test to see if the person has gone over 120 hours. If they have, then I want the answer to be 120 for any calculation that equals more than 120 hours.

How do I write the if, then statement for this?
Thank you!

=SUM(I17,C18)-F18

2. ## Re: If then statement help for accrual cap

Use

=MIN(your_calculation,120)

3. ## Re: If then statement help for accrual cap

Do you want this?

=IF(SUM(I17,C18)-F18>120,120,SUM(I17,C18)-F18)

4. ## Re: If then statement help for accrual cap

Like this?

MIN(I17+C18-F18),160

#### Thread Information

##### Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1