Question
Mar 29, 2006, 12:40 AM
New Member
Join Date: Sep 2005
Location: Zagreb, HR
Posts: 9
Round up in Excel
Hi!
I am wondering how to solve this:
numbers in one column need to be rounded to the nearest half decimal, for example: 0,4 - 0,5 0,7 - 1,0 1,4 - 1,5 1,1 - 1,5
Is there an easy way around this?! Could You help!!
Many thanks, You're all the best!
Srecak
Answers
Mar 29, 2006, 01:50 AM
#2
Administrator
Join Date: Aug 2005
Location: Cave 4, Qumran
Posts: 6,950
Searching Excel Help I do not find rounding to the nearest half decimal as an option. (I'm using Excel 2002)
I only find rounding options for
up,
down,
nearest number, or
number of decimal places.
Comments on this post Srecak
agrees:
Thanks Rick, but this doesn't really 'fix' my problem...
Mar 29, 2006, 02:02 AM
#3
Senior Member
Join Date: Aug 2005
Location: Guernsey
Posts: 608
Can't figure out how to do this in the entry cell but if you enter the following formula:
=IF(SUM(F8)-INT(F8)<0.5,INT(F8)+0.5,INT(F8))
in another cell, this does the job.
Note: F8 is your entry cell
Comments on this post RickJ
agrees:
Good one, colbtech!
Srecak
agrees:
Colbtech, nice try, but when You put 0.9 yr calculation shows 0.0, not 1.0, as will 1.7 show 1.0 not 2.0...!
Mar 29, 2006, 02:50 AM
#4
Full Member
Join Date: Jan 2006
Location: Boston, MA - USA
Posts: 426
Install the Analysis Pak and use this function:
=CEILING(A1,0.5)
The value would be in A1
Casey
Mar 29, 2006, 02:57 AM
#5
Full Member
Join Date: Jan 2006
Location: Boston, MA - USA
Posts: 426
Actually I just realized that you don't need the Analysis Pak for the CEILING function but if you do want to use that pak go to TOOLS -> Add-Ins and then check the Analysis Pak. It has functions such as MROUND which you might find handy.
Casey
Comments on this post Srecak
agrees:
Cajalat! You are the MAN!!!!! Many thanks, Srecak
RickJ
agrees:
Nice wrap up cajalat!
Mar 29, 2006, 03:37 AM
#6
Full Member
Join Date: Jan 2006
Location: Boston, MA - USA
Posts: 426
Colbtech,
Your formula wasn't too far off and you were on the right track. I think this is what you were gunning for:
Code:
=IF(F8-INT(F8)<=0.5,IF(MOD(F8,1)=0,F8,INT(F8)+0.5),ROUNDUP(F8,0))
Casey
Mar 29, 2006, 03:40 AM
#7
Full Member
Join Date: Jan 2006
Location: Boston, MA - USA
Posts: 426
Srecak,
Glad to help and thanks for letting us know that it worked for you
Casey
Mar 29, 2006, 04:58 AM
#8
Senior Member
Join Date: Aug 2005
Location: Guernsey
Posts: 608
thanks caj,
I looked at my formula.....must have been a bad day. Should have taken a little more time to check! That'll teach me.
Feb 26, 2007, 11:52 AM
#9
New Member
Join Date: Feb 2007
Posts: 1
ceiling will not always give the rounded value:
ceiling(22.1,0.5)=22.5
but rounding it to nearest val should be 22.0
try this: =ROUND(A1/0.5,0) * 0.5
which would return : 22 for 22.1 , 22.5 for 22.3
ceiling and floor in one function!!!!
Jun 21, 2007, 01:59 AM
#10
New Member
Join Date: Jun 2007
Posts: 1
Quote:
Originally Posted by gr8one
ceiling will not always give the rounded value:
ceiling(22.1,0.5)=22.5
but rounding it to nearest val should be 22.0
try this: =ROUND(A1/0.5,0) * 0.5
which would return : 22 for 22.1 , 22.5 for 22.3
ceiling and floor in one function!!!!
This is great... but .. is it possible to round to to 2 decimal places
eg.
10.00 - 10.24 = rounded down to 10
10.25 - 10.49 = rounded up to 10.5
10.5 - 10.74 = rounded down to 10.5
10.75 - 10.9 = rounded up to 11
Question Tools Search this Question Display Modes Linear Mode