Forum Discussion
CREATECommercial
Apr 28, 2023Copper Contributor
If than Formula.
If I want to run a formula that is IF cell E1 is less than 0, than 0, if greater than, then e1/d1 what would it look like. Thanks for any help as I am not great with IF than formulas.
The formula would return #DIV/0! if D1 equals 0, not if E1 equals 0.
Perhaps
=IF(OR(E1<0,D1=0),0,E1/D1)
- mtarlerSilver Contributor=IF(E1<0,0,E1/D1) that said if D1 is always positive then =MAX(0, E1/D1) would also work
- CREATECommercialCopper ContributorThank you. This works great with one exception. When E1 is zero I get a #DIV/0! In the F1 cell the formula is in. It works great if the value of E1 is higher than zero.
The formula would return #DIV/0! if D1 equals 0, not if E1 equals 0.
Perhaps
=IF(OR(E1<0,D1=0),0,E1/D1)