OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

[SOLVED] Rounding question

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
TeacupofDoom
General User
General User


Joined: 23 Nov 2008
Posts: 10

PostPosted: Wed Dec 10, 2008 4:38 pm    Post subject: [SOLVED] Rounding question Reply with quote

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
Back to top
View user's profile Send private message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Wed Dec 10, 2008 8:35 pm    Post subject: Reply with quote

=ROUND(A1/100)*100

David.
Back to top
View user's profile Send private message
Sliderule
Super User
Super User


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

PostPosted: Wed Dec 10, 2008 9:38 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
RickRandom
Super User
Super User


Joined: 27 Jan 2006
Posts: 1082
Location: UK

PostPosted: Thu Dec 11, 2008 11:01 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
David
Super User
Super User


Joined: 24 Oct 2003
Posts: 5668
Location: Canada

PostPosted: Thu Dec 11, 2008 6:15 pm    Post subject: Reply with quote

I hadn't realised that the function would work that way. I'll check further into it.

David.
Back to top
View user's profile Send private message
TeacupofDoom
General User
General User


Joined: 23 Nov 2008
Posts: 10

PostPosted: Fri Dec 12, 2008 9:24 am    Post subject: Reply with quote

Yes! That's exactly what I was looking for. Thanks a lot guys =)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group