Rounding off to nearest whole number without condition

hi,
i want to round a real number to an integer value,,wihout any conditions like
10.01 should be 11
10.1 should be 11 and like that
is it posible to do it?
thanks in advance.
amit

It doesn't look like you are trying to round to the nearest whole number here. It looks like you are trying to find the smallest integer value that is greater than or equal to the real number. If so, you would want to use the CEIL function (i.e.
  1  SELECT CEIL(10.01)
  2*   FROM dual
SCOTT @ hp92 Local> /
CEIL(10.01)
         11Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • Rounding up to nearest whole number question

    I have a calculation script that sometimes returns a decimal result. How would I create a script that would round that decimal up to the next whole number? Anyone have any idea's?

    okay, I am not very good with this. That command is new to me. Where would I place that script if I already have a javascript script in the calculate event of that numeric field I am trying to get rounded up?
    I basically have the javascript code in the numeric fields calculate event set to
    this.rawValue = subform1.numericField1.rawValue;
    I tried putting your script on the change event hoping I could use formCalc there but get a error when testing saying Ceil is not defined. Thanks

  • Formula rounding to nearest whole number

    Hello,
    I have created the following formula ( Metrics."# of Leads Resulting in Won Opportunity"*100 /Metrics."# of Leads" ) and displayed the results in percentage but it looks to round to the nearest whole number does anyone know why this might happen. Also i am using 2dp in the results i am hoping to get the actual result rounded to 2dp and not the nearest whole number.

    Hi !
    I think that if you add the ROUND function, this will work... :
    ROUND(Metrics."# of Leads Resulting in Won Opportunity"*100 /Metrics."# of Leads", 2)
    Hope this will help, feel free to ask more !
    Max

  • Rounding text size to nearest whole number?

    I've had to rescale some artwork, but now I'm left with type sizes that are 71.68px tall, 34.51px tall, etc.
    Is there a script that'll snap all the text in a document to it's nearest whole number or 0.1 decimal?

    // rounds the size of text in all textFrames in your document
    var aTFrame = app.activeDocument.textFrames;
    for ( i = 0; i < aTFrame.length; i++ )
    var fractionSize = aTFrame[i].textRange.characterAttributes.size;
    var RoundedSize = Math.round(fractionSize);
    aTFrame[i].textRange.characterAttributes.size = RoundedSize;
    redraw();
    This will do all the text frames. Copy the above, paste it into a text editor or the Adobe ESTK (ExtendScript Tool Kit) and save as a plain text file with a .jsx extension. Place it into Applications/Adobe Illustrator CSX/Presets/en_US/Scripts folder and restart AI. Run it by having a document open in AI and call it from File>Scripts>scriptname.

  • Always round up to nearest whole in APO DP

    Hi
    there is a requirement to always round up data to nearest whole number. number should be always rounded above and not rounded down.
    Example a value of 0.07 should be rounded to 1
    a value of 1.25 should be rounded to 2
    a value of 1.75 should be rounded to 2
    a value of 1.07 should be rounded to 2
    and so on
    Is there a way i can achieve in APO DP by some settings/paramater/config/macro/exit etc etc - i am on SCM 7.0
    Thanks,
    TJ

    Tejinder
    Try using the CEIL() function in a macro.
    Rishi Menon

  • Rounding off to nearest value with formatNumber

    Can I use the formatNumber tag to round my numeric value to the nearest value?
    Like if it's 15.7 I would like to display 16
    And if it's 15.2, I would like to display 15
    I could successfully truncate by giving a patteren but Im not sure if I can round it off.
    Regards,
    Leena

    Yes you can - the following works on JSTL 1.1 / Tomcat 5.5 :
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <html>
    <head><title></title></head>
    <body>
    Test Auto Rounding of 16.8 :
    <fmt:formatNumber value="16.88" pattern="##"/>
    <br/><br/>
    Test Auto Rounding of 16.2 :
    <fmt:formatNumber value="16.22" pattern="##"/>
    </body>
    </html>Message was edited by:
    appy77

  • Rounding off to nearest decimal point

    i have these values
    35.2
    35.3
    35.4
    35.5
    35.7
    35.8
    35.9
    36.0
    i am looking for indexes closet 35.74 in my array. (which is index 4.)
    i used the "round to nearest" function and it gave me 36.
    which is index 7.
    what other ways to get the right index?
    Solved!
    Go to Solution.

    You will always have some difficulties with rounding to a specific number of digits after the decimal point because of the way numbers are represented in binary. When expressed in binary 0.1 is an infinitely repeating expression. Regardless of the display the internal representation of the number always uses the maximum resolution for the data type (8 bytes for DBL).
    So you need to be very careful to define exactly what you  want. If you have an array of values (regardless of the way they are displayed) Then you can find the closest to a Test Value by subtracting Test Value from the array and finding the minimum of the absolute values of the differences.
    Note that in the image below the same values are in Array and Array 2 with the display on Array 2 set for 20 siginficant digits. 
    Lynn

  • Forecast rounding off

    hi all
    the forecast which i receive from other system ( APO / BW ) comes in decimals even for an unit which wont have decimals. ( say Number, Item etc).
    is there any settings that should be done so that the values get rounder off.
    rgds
    jolly

    Dear,
    You can maintain the following values for user parameter MM_FCST_ROUND:
        ' ':(No value maintained): Rounding as in standard.
        'K': Rounding to the nearest whole number.
        'B': Rounding always down.
    The setting of user parameter MM_FCST_ROUND not only affects the material forecast with Transactions MP30, MP38 and MPBT but also with Transaction MM02.
    Please try and come back.
    Regards,
    R.Brahmankar

  • Rounding to a whole number

    What is the proper syntax for rounding to a whole number.  In my spread sheet I have a function set up to apply a divisor to cost, in this case  = F7 $625 / G7 .65 = $961.54.  I simply want the number to round to the nearest whole dollar amount  $962.00

    Hi ghemmen,
    or you could just do with formatting.
    quinn

  • Rounding a percent to a whole number

    Hello,
    I'm still fairly new to performing script calculations and with this particular one seems a bit more complex for me.
    I'm trying to determine the percent difference between 2 numbers and display the percentage as a whole number. Logically my calculation looks like
    (numericField1 - numericField2 / numericField1 * 100)
    (ex. 1000 - 850 / 1000 * 100 = 15%)  
    I need assitance with my calculation and especially rounding the % to a whole number. I would not like any answers displayed like 22.66666%
    The code below is somethig I tried
    event.value = roundNumber( ( this.getField(numericField1).value - this.getField(numericField2t).value  )  / this.getField(numericField1).value , 2 ) + '%';
    function roundNumber(num, dec) {
            var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
            return result;
    Any advice would be great!

    Actually Adobe makes this really simple for you.  If you use a numeric field to display the result, the display pattern for the field will control how the number is shown.  You can set a percentage pattern:"num{zzzz9.99%}" to control how many digits will be displayed, and how many digits will be significant past the decimal point.  If there are more digits, Adobe will automatically round the number.  In the attached example I used the pattern
    "num{zzzz9%}" to ensure that only a whole number will be displayed.  Adobe will use normal rounding rules: 0-4 rounds down, 5-9 rounds up.
    Additionally, the percentage pattern will automatically multiply the field value by 100, so you don't need to do that in your script.
    For the example attached, I added your calculation as FormCalc script to the Calculate event of the result field.  The script is now simply:
    (NumericField1 - NumericField2) / NumericField1
    Adobe takes care of the rest.

  • Rounding off value problem in sales order

    Hi All,
    This is related to a rounding off value problem in sales order.
    The problem is described by an example which is as follows -
    Selling Price of Material A = Rs. 176.76
    Excise charged = Rs. 21.80
    Total Price = Rs.176.76 + Rs.21.80 = Rs. 198.56
    On this total Trade Discount (ZDTD) having access sequence,is calculated  at the rate of 4% = Rs. 7.94
    But the condition base value after the discount is showing Rs.198.60 instead of Rs.198.56
    I want the system to reflect the value as Rs.198.56 intact and it should not round up to the nearest value i.e. Rs. 198.60
    Why is this happening? Is it possible to reflect the exact value? If yes what is needed to be done?
    The commercial round off is activated for the DIFF Condition Type.
    Looking forward to some valuable suggestions.
    Thanks & Regards
    Priyanka Mitra

    Hi Ramesh,
    Thanks for your suggestion but the problem has been solved by me.
    Regards
    Priyanka Mitra

  • Rounding-off difference in Line Item vs Invoice

    Can anyone help on how to correct the rounding-off difference in the amount per line item display vs the amount printed in the invoice?  In viewing the document, the line item has an amount of 187.09, meanwhile, when invoice was printed, the amount was 187.10.

    Hi
    Ask ABAPer to modify the format for the invoice amont number field not to round off to nearest value in invoice form.
    Regards
    Laxmiprasad

  • Excise Rounding off

    Hi,
    Anybody help me regarding following issue where to assign rounding off for excise duty (BED,Ecess,HEcess)
    Regards,
    vivek

    Hi,
    In your calculation schema maintain AltCTyp as 17 against these conditions.This will round off to nearest rupee.
    Dhruba

  • Service Tax rounding-off

    Dear All,
    In one of our client service tax is rounded off to nearest paisa i.e. Rs. 145.98
    But the client need to round-off to nearest rupees i.e. 146.00
    Is it possible to round-off to nearest rupees? If it so than please explain me in detail how to do that.
    Thanks & Best Regards,
    nms

    Hi Vijay,
    If you do what you have mentioned  - the system will round the amount irrespective of whether it is more than .50 or not.  Ex. If you select rounding rule as A it will round up to next rupee eventhough the amount is ex. 50.02 will round as 51. 
    Rounding will be configured in tax procedure against Condition type you have to select as 17 in Caluclation type coloumn.
    BSR

  • How to round off quantity in inventory

    Hi,
    How to avoid decimal places for PC(Piece) in the goods movement transactions..  I have given 0 decimal places in CUNI transaction. It is working properly for Production Order during Conrimation but it is not working in Inventory transactions like MIGO, MB1C,MB1A....
    for example When I enter Unint of entry In Alternate Unit say '10 KG'  System Automatically Caliculates quantity in base unit in decimal places say 115.012 PC based on the conversion factor defined in material master.
    My requiremet is the base unit quantity PC rounded off to nearest value in as 115 (PC).
    The same thing is working fine for production order.
    please suggest me how to do.
    Thanks,
    Shekar

    this all depends on your conversion rate enterd in material master.
    if 115.012 PC  equals 10 KG.
    what do you actually want the system to do,
    it would now that you would get 115.012
    you want it to be 115,
    this would then mean that you have to modify the entered quantity from 10 to 9something
    Is it that what oyu want?
    you certainly cannot have 115 PC and 10 KG if you dont change the conversion rate in your material master

Maybe you are looking for