MS Office Forum / Excel / New Users / May 2008
IF formula to round up values depending upon their outcome
|
|
Thread rating:  |
JM_Mc - 23 May 2008 19:13 GMT I am using an IF formula to calculate between two cells, one is J (width) the other is K (length). Currently these formulas give an answer that then has to be rounded up based on the decimal place. I need the formula to also round up the amount to quarter increments. For example if the answer is 1.17 then the formula needs to make it 1.25, if it is 1.33 then the formula needs to make it 1.5, and finally if it is 1.63 then the formula needs to make it 1.75. So how do I add or make the formula round up to quarter increments? The formula that I am using is: =IF(J41<=3,K41/4,IF(J41<=4,K41/3,IF(J41>4,K41/2)))
Sandy Mann - 23 May 2008 19:22 GMT Tty:
=IF(J41<=3,CEILING(K41/4,0.25),IF(J41<=4,CEILING(K41/3,0.25),IF(J41>4,CEILING(K41/2,0.25))))
 Signature HTH
Sandy In Perth, the ancient capital of Scotland and the crowning place of kings
sandymann2@mailinator.com Replace @mailinator.com with @tiscali.co.uk
>I am using an IF formula to calculate between two cells, one is J (width) >the [quoted text clipped - 10 lines] > The formula that I am using is: > =IF(J41<=3,K41/4,IF(J41<=4,K41/3,IF(J41>4,K41/2))) JM_Mc - 23 May 2008 19:39 GMT Thank you so much this has solved a question that has been around for quite sometime. Could you answer another formula for me. I have two cells that I need to sum up, one cell has a set value (E), and the second cell is a value that is only entered when needed (F). How do I sum up the two only when F has a value in it? (If there is no value in (F) I want the formula to not place (E)'s value as the sum).
> Tty: > [quoted text clipped - 14 lines] > > The formula that I am using is: > > =IF(J41<=3,K41/4,IF(J41<=4,K41/3,IF(J41>4,K41/2))) Sandy Mann - 23 May 2008 20:10 GMT Try:
=IF(F41="","",SUM(E41:F41))
 Signature HTH
Sandy In Perth, the ancient capital of Scotland and the crowning place of kings
sandymann2@mailinator.com Replace @mailinator.com with @tiscali.co.uk
> Thank you so much this has solved a question that has been around for > quite [quoted text clipped - 29 lines] >> > The formula that I am using is: >> > =IF(J41<=3,K41/4,IF(J41<=4,K41/3,IF(J41>4,K41/2))) daddylonglegs - 24 May 2008 14:48 GMT Here's another option for your first question.....
=CEILING(K41/INT(7-J41),0.25)
> Try: > [quoted text clipped - 33 lines] > >> > The formula that I am using is: > >> > =IF(J41<=3,K41/4,IF(J41<=4,K41/3,IF(J41>4,K41/2))) daddylonglegs - 24 May 2008 14:54 GMT Sorry, that would need to be....
=CEILING(K41/MIN(4,MAX(2,INT(7-J41))),0.25)
> Here's another option for your first question..... > [quoted text clipped - 37 lines] > > >> > The formula that I am using is: > > >> > =IF(J41<=3,K41/4,IF(J41<=4,K41/3,IF(J41>4,K41/2))) Shane Devenshire - 24 May 2008 21:46 GMT Hi Sandy,
You might want to simplify the formula below to read:
=CEILING(K1/IF(J1<=3,4,IF(J1<=4,3,IF(J1>4,2))),0.25)
Cheers, Shane Devenshire Microsoft Excel MVP
> Tty: > [quoted text clipped - 15 lines] >> The formula that I am using is: >> =IF(J41<=3,K41/4,IF(J41<=4,K41/3,IF(J41>4,K41/2))) Shane Devenshire - 24 May 2008 21:53 GMT Hi again,
I see you got a shorter formula already, that one can also be shortened to:
=CEILING(K1/MIN(4,MAX(2,7-J1)),0.25)
Cheers, Shane Devenshire Microsoft Excel MVP
> I am using an IF formula to calculate between two cells, one is J (width) > the [quoted text clipped - 10 lines] > The formula that I am using is: > =IF(J41<=3,K41/4,IF(J41<=4,K41/3,IF(J41>4,K41/2)))
|
|
|