Excel formula Help!!!

Copper Contributor

I need to create a formula calculating sick time.

It's total number of hours worked/30 plus previous balance, but I only want the sheet to show a maximum of 40 hours. I eneter the hours worked each week.

A1 45 hour

B1 50 Hours

C1 60 hours

D1 previous balance

Sum(A1:C1)/30+D1 Here is where I do not know how to add in Only up to 40 hours

2 Replies
Wrap your formula with MIN like this:
=MIN(SUM(A1:C1)/30+D1,40)

@aramark_176 

You can also do it this way, using the IF function:

=IF(SUM(A1:C1)/30+D1>40,40,SUM(A1:C1)/30+D1)