Forum Discussion
Formula to Render zero if another field is empty
Hi,
I have a to calculate hours worked on a spreadsheet but the first hour is $50 and the subsequent hours are $35/HR .. so I built a column to add $50 which is populated when the hours are entered, and a formula in the next column taking the (total hours, - 1 *35) then add the two columns in the third column.
It works fine except when there are no hours entered, the formula field is rendering -35 because it's calculating 0-1*35... how do I get that column to render 0 when there are no hours entered..
I need to keep it at zero because I'm summing it for a total amount to be paid out, and the -35 is causing the total to be incorrect.
I've attached the spreadsheet to make more sense.
2 Replies
- Musical1FLCopper Contributor
Thank you so much Hans!! Really appreciate the help!
In G5:
=IF(E5>0, 50, 0)
or
=(E5>0)*50
In H5:
=MAX((E5-1)*35, 0)
Fill down.