Results 1 to 5 of 5

Thread: Rounding Errors

  1. #1
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am using the following formula:

    =SUMIF($D$21:$D$5015,"10",$F$21:$F$5015)

    The values in F21-F5015 may not be rounded to 2 decimals. I need the sum to ignore anything outside of the 2 decimals.

    So if there were 4 item's that contained a quarter penny, do not calculate that as 1p.

    How can I achieve this?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Do you want to round to the nearest penny? Try the following array formula (confirm with Ctrl+Shift+Enter)

    =SUM(IF(D21:5015="10",ROUND(F21:F5015,2)))

    Or do you want to round down? If so, again as an array formula

    =SUM(IF(D215015="10",ROUNDDOWN(F21:F5015,2)))

  3. #3

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    It's all air code...

  5. #5
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='783541' date='08-Jul-2009 15:42']It's all air code...[/quote]
    No probs, it's good to have the odd curve ball, keeps me on my toes..

Posting Permissions

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