Back to Forms in Excel VBA archive index

Back to archive home

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

Check out our Excel Resources | ||||

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

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

Thanks again.

Dianne

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

Thanks again.

Dianne

This archive is from the original message board at www.MrExcel.com.

All contents © 1998-2004 MrExcel.com.

Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.

Microsoft Excel is a registered trademark of the Microsoft Corporation.

MrExcel is a registered trademark of Tickling Keys, Inc.

All contents © 1998-2004 MrExcel.com.

Visit our online store to buy searchable CD's with thousands of VBA and Excel answers.

Microsoft Excel is a registered trademark of the Microsoft Corporation.

MrExcel is a registered trademark of Tickling Keys, Inc.