Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 138
Default Round to .05 or .09

How can I round prices to the nearest 0.05 or 0.09?

Eg 1
5.01 to 4.99
Eg 2
4.44 to 4.45

Regards,

Bruce
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 39
Default Round to .05 or .09

Bruce,

You can use the following formula:

=IF(MIN(ABS(RIGHT(A3*100,1)-5),ABS(RIGHT(A3*100,1)+10-5))<MIN(ABS(RIGHT(A3*100,1)-9),ABS(RIGHT(A3*100,1)+10-9)),(INT(A3*10)+0.5)/10,(INT(A3*10)+0.9)/10)

Replace cell A3 with the cell containing the 2 DIGIT number. This also
loses precision as the numbers 2 & 7 are equidistant from the 5 and 9.
--
Regards,
Eddie
http://www.HelpExcel.com


"Bruce" wrote:

How can I round prices to the nearest 0.05 or 0.09?

Eg 1
5.01 to 4.99
Eg 2
4.44 to 4.45

Regards,

Bruce

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 39
Default Round to .05 or .09

Bruce,

Major adjustments

=IF(MIN(ABS(RIGHT(A3*100,1)-5),ABS(RIGHT(A3*100,1)+10-5))<MIN(ABS(RIGHT(A3*100,1)-9),ABS(RIGHT(A3*100,1)+10-9)),IF(ABS(RIGHT(A3*100,1)-5)<ABS(RIGHT(A3*100,1)+10-5),(INT(A3*10)+0.5)/10,(INT(A3*10-1)+0.5)/10),IF(ABS(RIGHT(A3*100,1)-9)<ABS(RIGHT(A3*100,1)+10-9),(INT(A3*10)+0.9)/10,(INT(A3*10-1)+0.9)/10))
--
Regards,
Eddie
http://www.HelpExcel.com


"Bruce" wrote:

How can I round prices to the nearest 0.05 or 0.09?

Eg 1
5.01 to 4.99
Eg 2
4.44 to 4.45

Regards,

Bruce

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Round to .05 or .09

Bruce wrote...
How can I round prices to the nearest 0.05 or 0.09?

Eg 1
5.01 to 4.99
Eg 2
4.44 to 4.45


Meaning the last digit would always be either a 9 or a 5?

to 0.09: =ROUND(x,1)-0.01

to 0.05: =ROUND($A1,1)-0.05

Note: using the first, 5.04 rounds down to 4.99; using the second, 4.
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Round to .05 or .09

Bruce wrote...
How can I round prices to the nearest 0.05 or 0.09?

Eg 1
5.01 to 4.99
Eg 2
4.44 to 4.45


to 0.09: =ROUND($A10+0.011,1)-0.01

to 0.05: =ROUND($A10+0.051,1)-0.05

or

to 0.09: =ROUND($A10+0.009,1)-0.01

to 0.05: =ROUND($A10+0.049,1)-0.05

depending on whether you want to round, e.g., 5.04 up to 5.09 or down
to 4.99.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
round up Siteman Excel Worksheet Functions 2 February 4th 09 12:13 AM
round up firroo Excel Discussion (Misc queries) 2 December 18th 08 02:09 PM
Round up or down cybergardener Excel Discussion (Misc queries) 7 April 11th 07 10:10 PM
Round up to 100? Fred Holmes Excel Worksheet Functions 1 February 21st 05 02:40 PM
How do I ROUND() round off decimals of a column dataset? Højrup Excel Worksheet Functions 2 January 12th 05 10:50 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"