+ Reply to Thread
Results 1 to 8 of 8

SUMPRODUCT Function

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-18-2015
    Location
    Republic of Korea
    MS-Off Ver
    2010
    Posts
    314

    SUMPRODUCT Function

    Snap11.jpg

    why both results are different ? SUMPRODUCT({FALSE;FALSE;TRUE},{1;2;3}) <> =SUMPRODUCT({0;0;1},{1;2;3})

    i want to know why true , false cannot be converted to 1,0 automatically in sumproduct function ?
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: SUMPRODUCT Function

    Hi,

    A good question.

    in order to coerce Boolean TRUE/FALSE entries into their numerical equivalents (TRUE=1, FALSE=0), we must either use some function designed for that purpose, i.e. N, or else apply a suitable mathematical operation, e.g. multiplication, as can be seen if we use the "product" version equivalent of the formula you give, i.e.:

    =SUMPRODUCT({FALSE;FALSE;TRUE}*{1;2;3})

    According to the official Microsoft site:

    "SUMPRODUCT treats array entries that are not numeric as if they were zeros."

    (https://support.office.com/en-us/art...c-4d2145a2fd2e)

    Conclusion: the above statement applies equally to Booleans.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Contributor
    Join Date
    09-11-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003, Excel 2007, Excel 2013
    Posts
    103

    Re: SUMPRODUCT Function

    To add on, this is why in many formula for sumproduct. You could see people add "--", "*1", "*". This is to convert True and False from text to numerical, thus the sumproduct is able to multiply.
    Click * to reward me...
    Thank you...

  4. #4
    Forum Contributor
    Join Date
    09-18-2015
    Location
    Republic of Korea
    MS-Off Ver
    2010
    Posts
    314

    Re: SUMPRODUCT Function

    Hi crzu thank you!

  5. #5
    Forum Contributor
    Join Date
    09-18-2015
    Location
    Republic of Korea
    MS-Off Ver
    2010
    Posts
    314

    Re: SUMPRODUCT Function

    Hi XOR LX

    Thank you very much!

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SUMPRODUCT Function

    [Almost] everything you always wanted to know about SUMPRODUCT (but were afraid to ask)...

    http://xldynamic.com/source/xld.SUMPRODUCT.html
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    Forum Contributor
    Join Date
    09-18-2015
    Location
    Republic of Korea
    MS-Off Ver
    2010
    Posts
    314

    Re: SUMPRODUCT Function

    Thank you so much!

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SUMPRODUCT Function

    You're welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to back-solve for a distribution with given knowns
    By scruz9 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-02-2016, 10:22 PM
  2. [SOLVED] Sumproduct Function with Other Function References
    By T86157 in forum Outlook Formatting & Functions
    Replies: 4
    Last Post: 07-30-2012, 04:56 PM
  3. Replies: 9
    Last Post: 07-02-2012, 07:02 PM
  4. Replies: 10
    Last Post: 11-11-2010, 03:49 PM
  5. SUMPRODUCT function...
    By erbologist in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-29-2008, 10:44 AM
  6. [SOLVED] use of sumproduct function
    By R..VENKATARAMAN in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-22-2006, 11:00 PM
  7. [SOLVED] SUMIF Function Inside SUMPRODUCT Function
    By Abdul Waheed in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-19-2005, 12:05 PM

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