+ Reply to Thread
Results 1 to 6 of 6

Rounding Off

  1. #1
    Joohn Calder
    Guest

    Rounding Off

    Hi

    I have the following formula in my worksheet

    =IF(AK6="","",(AK6+AM6)/2)

    Even although I have formatted this column to zero decimal places the pivot
    table I use reads it to one deciamal place.

    Can anyone tell me how I could add the "ROUND" function to the above formula
    so that when my pivot table reads it there is zero decimal places?

    I use Excel 2000

    Thanks



  2. #2
    Max
    Guest

    Re: Rounding Off

    Try: =IF(AK6="","",ROUND((AK6+AM6)/2,0))

    --
    Rgds
    Max
    xl 97
    ---
    Singapore, GMT+8
    xdemechanik
    http://savefile.com/projects/236895
    --
    "Joohn Calder" <[email protected]> wrote in message
    news:[email protected]...
    > Hi
    >
    > I have the following formula in my worksheet
    >
    > =IF(AK6="","",(AK6+AM6)/2)
    >
    > Even although I have formatted this column to zero decimal places the

    pivot
    > table I use reads it to one deciamal place.
    >
    > Can anyone tell me how I could add the "ROUND" function to the above

    formula
    > so that when my pivot table reads it there is zero decimal places?
    >
    > I use Excel 2000
    >
    > Thanks
    >
    >




  3. #3
    Anne Troy
    Guest

    Re: Rounding Off

    Try this: =IF(AK6="","",round(AK6+AM6)/2),0)
    ************
    Anne Troy
    www.OfficeArticles.com

    "Joohn Calder" <[email protected]> wrote in message
    news:[email protected]...
    > Hi
    >
    > I have the following formula in my worksheet
    >
    > =IF(AK6="","",(AK6+AM6)/2)
    >
    > Even although I have formatted this column to zero decimal places the
    > pivot
    > table I use reads it to one deciamal place.
    >
    > Can anyone tell me how I could add the "ROUND" function to the above
    > formula
    > so that when my pivot table reads it there is zero decimal places?
    >
    > I use Excel 2000
    >
    > Thanks
    >
    >




  4. #4
    Peo Sjoblom
    Guest

    Re: Rounding Off

    If you want to round to nearest integer

    =ROUND(IF(AK6="","",(AK6+AM6)/2),-1)

    if you want to remove the decimals

    =INT(IF(AK6="","",(AK6+AM6)/2))


    =TRUNC(IF(AK6="","",(AK6+AM6)/2))


    INT and TRUNC works the same way for positive numbers but not for negative

    --
    Regards,

    Peo Sjoblom

    (No private emails please)


    "Joohn Calder" <[email protected]> wrote in message
    news:[email protected]...
    > Hi
    >
    > I have the following formula in my worksheet
    >
    > =IF(AK6="","",(AK6+AM6)/2)
    >
    > Even although I have formatted this column to zero decimal places the
    > pivot
    > table I use reads it to one deciamal place.
    >
    > Can anyone tell me how I could add the "ROUND" function to the above
    > formula
    > so that when my pivot table reads it there is zero decimal places?
    >
    > I use Excel 2000
    >
    > Thanks
    >
    >



  5. #5
    Peo Sjoblom
    Guest

    Re: Rounding Off

    Ouch, put the round, int or trunc inside the if function or else you'll get
    an error if AK6 is blank

    --
    Regards,

    Peo Sjoblom

    (No private emails please)


    "Peo Sjoblom" <[email protected]> wrote in message
    news:[email protected]...
    > If you want to round to nearest integer
    >
    > =ROUND(IF(AK6="","",(AK6+AM6)/2),-1)
    >
    > if you want to remove the decimals
    >
    > =INT(IF(AK6="","",(AK6+AM6)/2))
    >
    >
    > =TRUNC(IF(AK6="","",(AK6+AM6)/2))
    >
    >
    > INT and TRUNC works the same way for positive numbers but not for negative
    >
    > --
    > Regards,
    >
    > Peo Sjoblom
    >
    > (No private emails please)
    >
    >
    > "Joohn Calder" <[email protected]> wrote in message
    > news:[email protected]...
    >> Hi
    >>
    >> I have the following formula in my worksheet
    >>
    >> =IF(AK6="","",(AK6+AM6)/2)
    >>
    >> Even although I have formatted this column to zero decimal places the
    >> pivot
    >> table I use reads it to one deciamal place.
    >>
    >> Can anyone tell me how I could add the "ROUND" function to the above
    >> formula
    >> so that when my pivot table reads it there is zero decimal places?
    >>
    >> I use Excel 2000
    >>
    >> Thanks
    >>
    >>

    >



  6. #6
    Joohn Calder
    Guest

    Re: Rounding Off


    Thanks to all !

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1