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

Assuming the numbers are never more than 2 decimal places

=INT(A1+.49)

"Piotr (Peter)" wrote:

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 RonaldoOneNil View Post
Assuming the numbers are never more than 2 decimal places

=INT(A1+.49)

"Piotr (Peter)" wrote:

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 you have input value at A1, 1.51, copy this formulae to B1.

=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
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
ROUNDDOWN Excell function M8 Excel Worksheet Functions 4 February 13th 06 01:01 PM
Roundup or rounddown Heather Excel Worksheet Functions 2 November 15th 05 02:35 AM


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