[Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register]

Author Message
TeacupofDoom
General User

Joined: 23 Nov 2008
Posts: 10

 Posted: Wed Dec 10, 2008 4:38 pm    Post subject: [SOLVED] Rounding question Hey, guys, I searched through threads and couldn't find the answer I was looking for - maybe I was using the wrong criteria. Lets say i have a cell with a value of 276. Is it possibly to make that round it up to the next hundred (300) automatically? Thanks.[/b]Last edited by TeacupofDoom on Fri Dec 12, 2008 9:24 am; edited 1 time in total
David
Super User

Joined: 24 Oct 2003
Posts: 5668

 Posted: Wed Dec 10, 2008 8:35 pm    Post subject: =ROUND(A1/100)*100 David.
Sliderule
Super User

Joined: 29 May 2004
Posts: 2499
Location: 3rd Rock From The Sun

Posted: Wed Dec 10, 2008 9:38 pm    Post subject:

TeacupofDoom:

Just to add to the example David gave above . . . according to the Calc Help for the ROUND function:

 Calc Help: ROUND function wrote: ROUND Rounds a number to a certain number of decimal places. Syntax ROUND(Number; Count) Returns Number rounded to Count decimal places. If Count is omitted or zero, the function rounds to the nearest integer. If Count is negative, the function rounds to the nearest 10, 100, 1000, etc. This function rounds to the nearest number. See ROUNDDOWN and ROUNDUP for alternatives. Example =ROUND(2.348;2) returns 2.35 =ROUND(-32.4834;3) returns -32.483. Change the cell format to see all decimals. =ROUND(2.348;0) returns 2. =ROUND(2.5) returns 3. =ROUND(987.65;-2) returns 1000.

Therefore, you might consider:
 Code: =ROUND( 276, -2 )

I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your first post title (edit button) if your issue has been fixed / resolved.
RickRandom
Super User

Joined: 27 Jan 2006
Posts: 1082
Location: UK

 Posted: Thu Dec 11, 2008 11:01 am    Post subject: As well as ROUND( ) which rounds up or down (whichever is nearest) for the stated number of decimal places, there are: ROUNDUP( ) ROUNDDOWN( ) both to stated number of decimal places, and also CEILING( ) FLOOR( ) which work in any size steps, e.g. CEILING(75;20) gives 80, the next highest multiple of 20,and FLOOR(20;7) gives 14, the next lowest multiple of 7.
David
Super User

Joined: 24 Oct 2003
Posts: 5668

 Posted: Thu Dec 11, 2008 6:15 pm    Post subject: I hadn't realised that the function would work that way. I'll check further into it. David.
TeacupofDoom
General User

Joined: 23 Nov 2008
Posts: 10

 Posted: Fri Dec 12, 2008 9:24 am    Post subject: Yes! That's exactly what I was looking for. Thanks a lot guys =)
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 8 Hours Page 1 of 1

 Jump to: Select a forum OpenOffice.org Forums----------------Setup and TroubleshootingOpenOffice.org WriterOpenOffice.org CalcOpenOffice.org ImpressOpenOffice.org DrawOpenOffice.org MathOpenOffice.org BaseOpenOffice.org Macros and APIOpenOffice.org Code Snippets Community Forums----------------General DiscussionSite Feedback
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum