Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Roundup and rounddown function - how to combine

=ROUND(A1,0) follows the standard rounding rules: =1.5 up to 2

<1.5 down to 1
but if you insist on your own rounding rules then
=IF(A1<=1.5,ROUNDDOWN(A1,0),ROUNDUP(A1,0))
does that.

--
Regards!
Stefi



€˛Piotr (Peter)€¯ ezt Ć*rta:

Dear All,

I have a spreadsheet with numbers containing decimals. I would like to
combine somehow two functions so that if a number is e.g. 1.5 it should be
rounded down to 1 and if it is 1.51 it should be rounded up to 2.
How can I achieve this?

Your prompt response would be highly aprreciated.

Thanks

  #2   Report Post  
Senior Member
 
Location: Hyderabad
Posts: 237
Thumbs up

Quote:
Originally Posted by Stefi View Post
=ROUND(A1,0) follows the standard rounding rules: =1.5 up to 2

<1.5 down to 1
but if you insist on your own rounding rules then
=IF(A1<=1.5,ROUNDDOWN(A1,0),ROUNDUP(A1,0))
does that.

--
Regards!
Stefi



€˛Piotr (Peter)€¯ ezt Ć*rta:

Dear All,

I have a spreadsheet with numbers containing decimals. I would like to
combine somehow two functions so that if a number is e.g. 1.5 it should be
rounded down to 1 and if it is 1.51 it should be rounded up to 2.
How can I achieve this?

Your prompt response would be highly aprreciated.

Thanks

assuming the value exist in A1 cell i.e 1.51 and copy the formulae in B1 cell. it will work out.

=IF(LEN(A1)-FIND(".",A1,1)2,ROUNDDOWN(A1,0),IF(RIGHT(A1,FIND( ".",A1,1)+1)-0.50,ROUNDUP(A1,0),ROUNDDOWN(A1,0)))

all the best
__________________
Thanks
Bala
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
Roundup and rounddown function - how to combine RonaldoOneNil Excel Worksheet Functions 1 May 28th 10 05:26 PM
How do I roundup to .9 and rounddown to .9 Office Buddy Excel Worksheet Functions 3 November 17th 09 05:45 PM
rounddown + if function PoetsOnMars Excel Worksheet Functions 8 January 7th 09 02:11 PM
combine Rand & Roundup? Brainless_in_Boston New Users to Excel 3 May 10th 06 08:03 PM
Roundup or rounddown Heather Excel Worksheet Functions 2 November 15th 05 02:35 AM


All times are GMT +1. The time now is 09:46 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"