View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
GoBucks[_2_] GoBucks[_2_] is offline
external usenet poster
 
Posts: 57
Default Round up or down to $X.X9 or up to $X.X5

Mike your formula still provided a couple incorrect results...

$4.19 became 4.25 (should have stayed as is)
$2.74 became $2.69, should have been $2.75
$2.44 became $2.39

"Mike H" wrote:

Try

=IF(OR(MOD(A1,INT(A1))0.25,MOD(A1,INT(A1))=0),ROU ND(A1,1)-0.01,CEILING(A1,0.25))

Mike

"GoBucks" wrote:

I'm working on a pricing worksheet that calculates a product cost +
freight+margin to come up with a suggested product price. What I'd like to
be able to do is write a formula that converts all pricing to end with a 5 or
9. If the price already ends in a 5 or 9, nothing should change. If the
price ends in a 1,2,3 or 4, it should roundup to a 5. If the price ends in
6,7,8 it should round up to 9. If the pricing ends in zero, it should round
down to 9.

For instance:
$4.24 becomes $4.25
$3.26 becomes $3.29
$2.00 becomes $1.99

I'm guessing this will result in a doozy of a formula, but thought I'd
check.

Thanks in advance for your replies!