+ Reply to Thread
Results 1 to 3 of 3

SUMPRODUCT with dynamic range AND multiple criteria on the same row

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    SUMPRODUCT with dynamic range AND multiple criteria on the same row

    Hello,

    Attached are the image and the spreadsheet.

    2017-01-26 12_16_15-sample.xlsx - Excel.png

    As you can see on the top half of the image/sheet, the data was layout as is.

    On the bottom half on the left hand side, I've made it by SalesPerson by Country. This is used as a 'list' for Data Validation. For example, looking at SalesPerson across the column, we can see that 'Albert' has responsibility in country 'Canada', 'USA' and 'Europe'. and his products are 'B', 'H' and 'M'.

    Now, assume that when user select a value from the 'data validation', i.e. 'Albert', I'd like a formula that knows to take B21 to D21 as the lookup value and then, given another criteria (which is the month Jan to Dec), it'll take the value of each product and multiply it by the 'comission'.

    My problem here is that, how can I make together the SUMPRODUCT, INDEX and MATCH to work together for the dynamic lookup range (which in this example is B21 to D21)
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: SUMPRODUCT with dynamic range AND multiple criteria on the same row

    Hi

    In I21 as an array formula (entered with Ctrl Shift Enter) and copied down
    =SUM(($B$2:$O$2="Albert")*(OFFSET($B$4,MATCH(H21,$A$5:$A$16,FALSE),0,1,14)*($B$1:$O$1)))
    And in R21
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You just need to add two drop down cells and substitute the Albert and Canada in the formula with the two cells.

    I can't help thinking that if you created a normalised two dimensional table of data you could use a Pivot Table and have a lot more flexible tool for analysing/summarising your data.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: SUMPRODUCT with dynamic range AND multiple criteria on the same row

    Hi Richard,

    Thanks for your help!

    I should have mentioned that because I'm trying to create a sample, there's row 2 and 3 shown there.

    But in actuality, real data doesn't have that row 2 and 3. Only row 1 (commission) and 4 (product).

    That's why I'm using data validation so that user can know which SalesPerson and/or Country has what Product.

    Does that mean that there won't be a formula solution that enables to SUM "Jumping columns"?

+ 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. Replies: 2
    Last Post: 01-20-2017, 04:27 PM
  2. [SOLVED] SUMIFS with multiple criteria WITH specified dynamic range criteria
    By dluhut in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-20-2017, 11:03 AM
  3. Sumproduct with potentially multiple and dynamic or criteria
    By Gunblade in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-13-2016, 11:01 PM
  4. [SOLVED] dynamic range specification (based on column header) in sumproduct multiple condition
    By anand_erin in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-28-2012, 10:16 PM
  5. Replies: 1
    Last Post: 01-21-2011, 07:24 AM
  6. Sumproduct with multiple criteria & dynamic range
    By e_lad in forum Excel General
    Replies: 10
    Last Post: 03-17-2010, 09:15 AM
  7. Replies: 1
    Last Post: 09-19-2005, 10: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