Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Rounding up or down to specific decimal digits.

Folks,
I am trying to do the following:

I am looking at MSRPs for our products ..for example Product A comes with a
Base price of $71.16..Product B comes with a price of $54.78. I am trying to
round the end number to a 7 or 9...therefore, Prod A becomes $71.17 and
Product B becomes $54.79.....it needs to be somewhat "intuitive" i.e. $54.78
doesn't become $54.77 but rather $54.79 and so on.....

i am thinking I could use an ODD and some variant of ROUND function..not
sure how to combine them for the last decimal place...is this feasible?
Thanks for your help.

Regards,
Shams.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Rounding up or down to specific decimal digits.

I hope there is a better way

=A21+(IF(ROUND(MOD(A21,0.1),2)0.07,0.09,0.07)-ROUND(MOD(A21,0.1),2))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Shams" wrote in message
...
Folks,
I am trying to do the following:

I am looking at MSRPs for our products ..for example Product A comes with
a
Base price of $71.16..Product B comes with a price of $54.78. I am trying
to
round the end number to a 7 or 9...therefore, Prod A becomes $71.17 and
Product B becomes $54.79.....it needs to be somewhat "intuitive" i.e.
$54.78
doesn't become $54.77 but rather $54.79 and so on.....

i am thinking I could use an ODD and some variant of ROUND function..not
sure how to combine them for the last decimal place...is this feasible?
Thanks for your help.

Regards,
Shams.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 47
Default Rounding up or down to specific decimal digits.

Bob,
Thank you very much for your input. This rather complicated formula works
brilliantly! I just have to spend some time to understand what it's doing
....need to understand this intuitively

"Bob Phillips" wrote:

I hope there is a better way

=A21+(IF(ROUND(MOD(A21,0.1),2)0.07,0.09,0.07)-ROUND(MOD(A21,0.1),2))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Shams" wrote in message
...
Folks,
I am trying to do the following:

I am looking at MSRPs for our products ..for example Product A comes with
a
Base price of $71.16..Product B comes with a price of $54.78. I am trying
to
round the end number to a 7 or 9...therefore, Prod A becomes $71.17 and
Product B becomes $54.79.....it needs to be somewhat "intuitive" i.e.
$54.78
doesn't become $54.77 but rather $54.79 and so on.....

i am thinking I could use an ODD and some variant of ROUND function..not
sure how to combine them for the last decimal place...is this feasible?
Thanks for your help.

Regards,
Shams.




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
Excel is rounding off more than 16 digits ? Vijay Kotian Excel Discussion (Misc queries) 5 October 22nd 07 02:26 PM
How to truncate to tenths digits without rounding Steve Haack Excel Worksheet Functions 2 August 14th 07 10:52 PM
30 decimal digits WIlly Haagen Excel Discussion (Misc queries) 2 March 11th 07 07:16 PM
Can I stop Excel from seeing more than 2 digits after decimal? JDueck Excel Worksheet Functions 3 May 4th 06 07:55 PM
Displaying only digits after the decimal point Tat Excel Worksheet Functions 4 June 1st 05 06:13 PM


All times are GMT +1. The time now is 06:30 AM.

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"