# If Than formula returning 0 or calculates value

1. ## If Than formula returning 0 or calculates value

Hi all,

I am attempting to return a value to a cell with labor hours that cannot be less than .8, but can be 0 if 0 is entered.

For instance..

if a person enters a quantity of 0 in N22, P22 will say 0,
but if N22 is entered as a real number (greater than 0), it will multiply the quantity (N22) times the hourly rate (E22).
The returned value cannot be below .8 hours unless entered as 0.

Here is my sorry attempt to make it work.
=IF(E22*N22<.8,.8, IF(E22*N22=0,""),E22*N22)
But it doesn't.

Your help is most appreciated !  Register To Reply

2. ## Re: If Than formula returning 0 or calculates value

Try this in P22 ``Please Login or Register  to view this content.``  Register To Reply

3. ## Re: If Than formula returning 0 or calculates value

Try this...

=IF(N22=0,0,MAX(.8,E22*N22))  Register To Reply

4. ## Re: If Than formula returning 0 or calculates value

Well... That solves the "0" issue but not the .8 minimum issue.
I need to see a minimum value of .8 in P22 unless a 0 is entered.
As it is, if we have .2 hours (E22) * a quantity of 1 (N22), it shows .2 which is below the minimum.  Register To Reply

5. ## Re: If Than formula returning 0 or calculates value

Works! Thank you.
I was unaware of the MAX function.
Very cool.  Register To Reply

6. ## Re: If Than formula returning 0 or calculates value  Register To Reply

7. ## Re: If Than formula returning 0 or calculates value

No worries.  Register To Reply

8. ## Re: If Than formula returning 0 or calculates value

Glad it works for you... thank you for the rep!  Register To Reply

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