Round up to the nearest integer in OpenOffice

nathchen -  
Raymond PENTIER Posted messages 58213 Registration date   Status Contributor Last intervention   -
Hello,
To calculate the number of servers needed for an event, I need to be able to round a decimal number up to the NEXT INTEGER. After browsing through the Open Office Calc help, I cannot figure out how to do this. Your assistance would be greatly appreciated, thank you for your response.
Nathchen
"Pride comes before a fall"
Configuration: Windows Vista Firefox 3.0.14

2 answers

  1. Raymond PENTIER Posted messages 58213 Registration date   Status Contributor Last intervention   17 482
     
    With the decimal number in A1, the formula in B1 is =CEILING(A1)
    --
    It's great, retirement! Especially in the Caribbean... :-)
    ☻ Raymond ♂
    12
  2. Nyctaclope Posted messages 5295 Registration date   Status Member Last intervention   1 254
     
    Good evening!
    The solution is the integer value of ( Number + 1 )
    it seems to me...
    provided that Number is not an integer
    So subordinate to the condition Ent(number)≠number

    So something like:
    => Number = If ( Ent(number)=number ; number ; Ent(number + 1 ) )
    if ENT() is indeed the syntax for the integer value function (I can't remember).

    That is if you don't have Round.up() which, I believe, gives the same result in Excel..

    You should also be able to do: 1 + integer value ( number ) if number is not an integer, and it's easier to understand:

    => Number = If ( Ent ( number ) < number ; 1 + Ent ( number ) ; number )
    because Ent(number) cannot be > number

    In both IF() functions, you can of course switch the True/False results by "flipping" the condition
    For example for the last one:
    => Number = If ( Ent ( number ) = number ; number ; 1 + Ent ( number ) )

    You must of course remove all the "readability" spaces from the formulas...

    I hope I haven't messed it up... but the test is easy to do...

    See you later

    Nyctaclope
    2