+ Reply to Thread
Results 1 to 2 of 2

sumproduct using array of named ranges

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

    sumproduct using array of named ranges

    I would like to know how to use SUMPRODUCT (or another function) to obtain the sum of the products of a series of values in Row 1 against the values of a series of named ranges in Row 2. I believe I need the syntax for using INDIRECT in an array within the SUMPRODUCT formula; something like:

    sumproduct(A1:C1,indirect(A2:C2))

    where cells A2:C2 contain names of named ranges.

    The plan is to be able to edit the range names to refer to different named ranges, and see the effect of the different named-range values on the sumproduct value.

    Thank you.

  2. #2
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    If you simply use the formula (adjusting for your ranges)

    =SUMPRODUCT(($A$1:$A$4)*(INDIRECT(D1)))

    Where D1 contains the name of the range you want to evaluate you can change the value of D1 to another range name and see the result.





    Quote Originally Posted by Exceler
    I would like to know how to use SUMPRODUCT (or another function) to obtain the sum of the products of a series of values in Row 1 against the values of a series of named ranges in Row 2. I believe I need the syntax for using INDIRECT in an array within the SUMPRODUCT formula; something like:

    sumproduct(A1:C1,indirect(A2:C2))

    where cells A2:C2 contain names of named ranges.

    The plan is to be able to edit the range names to refer to different named ranges, and see the effect of the different named-range values on the sumproduct value.

    Thank you.
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

+ 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