+ Reply to Thread
Results 1 to 9 of 9

SUMPRODUCT() with LOOKUP() as argument

  1. #1
    Registered User
    Join Date
    06-05-2012
    Location
    Bern, Switzerland
    MS-Off Ver
    Excel 2003
    Posts
    62

    SUMPRODUCT() with LOOKUP() as argument

    Hi,

    I have a SUMPRODUCT function, which needs to lookup its arguments. I have tried

    Please Login or Register  to view this content.
    This function returns #value.

    Please Login or Register  to view this content.
    itself works if CTRL-SHIFT-ENTERed. If entered normally, the function returns also #value.

    Does somebody know, if and how array (CTRL-SHIFT-ENTER) functions can be arguments of a SUMPRODUCT function?

    Thanks!!
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: SUMPRODUCT() with LOOKUP() as argument

    If you can sort your I7:J10 table in alphabetically ascending order by Name column.

    then you can use:

    =SUMPRODUCT((LOOKUP($I$20:$I$25,$I$7:$J$11)=$A2)*($J$19:$L$19=B$1),$J$20:$L$25)

    copied down and across.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    06-05-2012
    Location
    Bern, Switzerland
    MS-Off Ver
    Excel 2003
    Posts
    62

    Re: SUMPRODUCT() with LOOKUP() as argument

    Getting closer, thanks!!

    What if the input is not in alphabetical order?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: SUMPRODUCT() with LOOKUP() as argument

    Is it a problem to sort it?

  5. #5
    Registered User
    Join Date
    06-05-2012
    Location
    Bern, Switzerland
    MS-Off Ver
    Excel 2003
    Posts
    62

    Re: SUMPRODUCT() with LOOKUP() as argument

    Yes. Somebody will copy and paste several input sheets in the workbook, and the results will be calculated automaticly (nice dream, not?)

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: SUMPRODUCT() with LOOKUP() as argument

    Ok, try:

    =SUMPRODUCT((ISNUMBER(MATCH($I$20:$I$25&$A2,$I$7:$I$11&$J$7:$J$11,0)))*($J$19:$L$19=B$1),$J$20:$L$25)

  7. #7
    Registered User
    Join Date
    06-05-2012
    Location
    Bern, Switzerland
    MS-Off Ver
    Excel 2003
    Posts
    62

    Re: SUMPRODUCT() with LOOKUP() as argument

    Funny! The LOOKUP-version gives different results due to alphabetical issues, and the MATCH-version gives also different results (not the same as LOOKUP)

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: SUMPRODUCT() with LOOKUP() as argument

    I got the same results in the sample you attached.

  9. #9
    Registered User
    Join Date
    06-05-2012
    Location
    Bern, Switzerland
    MS-Off Ver
    Excel 2003
    Posts
    62

    Re: SUMPRODUCT() with LOOKUP() as argument

    Wow, sorry. I must have made a copy and paste mistake. I love you!!

+ 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