• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Product Price Rounding

annalisak

New Member
Thank you for a wonderful site. I find it useful every day!


My question has to do with product price rounding. I would like all prices to end in either 4.95 or 9.95. I need a formula(?) to look at the first digit to the left of the decimal. So if a product's last digit is 0-4 it would round up to 4.95. For example $1 (rounded to 4.95) or $212 (rounded to 214.95). If the last digit is 5-9 it would round up to 9.95. For example $16 (19.95) or $1,858 (1,859.95).


I hope I made that as clear as possible. I haven't been able to put together any combination of formulas in order to look at the first digit to the left of the decimal.


I appreciate any help :)
 
interesting question indeed..


assuming product price is in A1, use the below formula,


=int(a1/10)*10+if(mod(a1,10)<5,4.95,9.95)
 
Back
Top