MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Help with IF formula


Posted by Dianne on November 21, 2000 9:26 AM

Hello:

I am having a problem with a formula. Here is what I need to do:

I have a basic =sum(D6*1.40) Now, if column B is showing a "B", I need it to round up to nearest nickel. If it is showing "ST" i do not want it to round up. I have tried many ways, but can only B to work, but not when an ST is in the column. Maybe I am looking at the wrong formula all together. Thanks in advance for your help.
Dianne
heavington@earthlink.net


Posted by Ben O. on November 21, 2000 9:38 AM

How about this:

=IF(B1="B",ROUND(SUM(D6*1.4),2),IF(B1="ST",SUM(D6*1.4),""))

I'm not sure how to round up to the nearest nickel, so you can replace my round formula with the one you use. Also, I have the formula doing nothing if B1 is neither "B" nor "ST". If you want it to still do SUM(D6*1.40) in those cases, replace the final "" in my formula with your sum formula.

Sorry if I misunderstand you,

-Ben

Posted by Dianne on November 21, 2000 10:21 AM

Thanks for the help Ben. Usually I use =Ceiling, and it works well with rounding up to nearest nickel, not sure how to incorp. that into you calcs.
Thanks again.
Dianne

Posted by Dianne on November 21, 2000 10:28 AM

Well, I got it working. Thanks again for your help. Love this board!!

Thanks again.
Dianne