+ Reply to Thread
Results 1 to 8 of 8

Indirect Sumproduct

  1. #1
    Registered User
    Join Date
    07-10-2006
    Posts
    18

    Indirect Sumproduct

    The formula:

    =sumproduct((A1:A2)*indirect(B1))

    works, but when I try to use a range of indirectly defined values:

    =sumproduct((A1:A2)*indirect(B1:B2))

    I get a Value error. Have I got the syntax wrong? Is there another way to do this?

    Thanks

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Can you post a .zip sample of your spreadsheet showing what you are trying to do?

  3. #3
    Registered User
    Join Date
    07-10-2006
    Posts
    18

    Indirect Sumproduct example

    Here it is. I need to prevent the raw salaries from appearing
    in the sheet everyone is viewing.

    Thanks for your help.

    By the way, I've tried using a comma instead of the *, and I've tried saving the formula as an array formula; neither worked.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-10-2006
    Posts
    18

    Indirect Sumproduct -corrected example

    Sorry - I didn't edit the second reference formula.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Try this formula instead and let me know if it works.

    =SUMPRODUCT((A1:A2)*(INDIRECT(B1):INDIRECT(B2)))

  6. #6
    Registered User
    Join Date
    07-10-2006
    Posts
    18

    Indirect Sumproduct

    That's a winner! Thanks a lot!

  7. #7
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Glad I could help.

  8. #8
    Registered User
    Join Date
    07-10-2006
    Posts
    18

    Indirect Sumproduct

    Thanks for your help, but the formula does not continue to work when the indirect values are named on a different sheet. It seems to add up the indirect values and multiply the total against the values in the other range, instead of multiplying each pair.

    At other times, when the direct range includes a value that is not associated with a named range, the formula sometimes gives a Value or N/A error, but sometimes multiplies the next available named range in the indirect range against the unmatched direct value, and instead of an error, just shows an incorrect value. Pretty scary!

+ 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