+ Reply to Thread
Results 1 to 2 of 2

SumProduct Problem

  1. #1
    Forum Contributor
    Join Date
    05-19-2004
    Location
    United States
    MS-Off Ver
    Office XP and Office 2003
    Posts
    127

    SumProduct Problem

    The SumProduct does not seem to be working correctly when the sum of numbers in one range is equal to 0. I have 2 sets of numbers. In the first set, the user has entered the following numbers:
    -3196414.12, 799103.53, 799103.53, 799103.53, 799103.53

    The second set of numbers is just a flag where all of them contain a 1:
    1, 1, 1, 1, 1

    The following formula results in an actual number instead of 0. It results in 0.000000000232830643653870000000.

    =SUMPRODUCT(A7:E7,A8:E8)

    When I do it manually, I get 0. Do you know why I'm getting a number using this formula? Is there a way to get the correct number, which should be 0?
    Last edited by VBA Noob; 04-09-2009 at 03:46 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: SumProduct Problem

    This is caused by the floating point arithmetic that excel uses, see here

    To get zero you probably need to use ROUND function to round the result, e.g.

    =ROUND(SUMPRODUCT(A7:E7,A8:E8),2)

+ 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