ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Rounding decimal (https://www.excelbanter.com/excel-worksheet-functions/72144-rounding-decimal.html)

Sturart

Rounding decimal
 
Working on a spread sheet that I would like a set cell (example $10.01) to be
rounded to the nearest $.95, $.50. $25. I'm want to round on my pricing to
these amounts.

Thanks for your help.

Elkar

Rounding decimal
 
Ok, assuming I understand your criteria correctly, that you want all prices
to round to the NEAREST of these 3 possibilities (.25, .50, .95) then this
should work:

=IF(A1-INT(A1)<=0.1,INT(A1)-0.05,IF(A1-INT(A1)<=0.375,INT(A1)+0.25,IF(A1-INT(A1)<=0.735,INT(A1)+0.5,INT(A1)+0.95)))

HTH,
Elkar

"Sturart" wrote:

Working on a spread sheet that I would like a set cell (example $10.01) to be
rounded to the nearest $.95, $.50. $25. I'm want to round on my pricing to
these amounts.

Thanks for your help.



All times are GMT +1. The time now is 08:42 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com