+ Reply to Thread
Results 1 to 7 of 7

How to group lookup values for SUMIFS when using Data validation list

  1. #1
    Forum Contributor
    Join Date
    06-08-2021
    Location
    Toronto
    MS-Off Ver
    2016
    Posts
    101

    How to group lookup values for SUMIFS when using Data validation list

    Hey guys,

    In the attached sample file, I have two sheets. "Data" sheet is the source and "Summary" is the reporting sheet. I have four product A, B, C and D. A and B are Legacy products but have different price values as shown in the "Data" Sheet. My goal is to select the option "Legacy" from the list in "Summary" sheet so that the table next to the list displays the combined values for A and B. I have a column highlighted in the sheet "Summary" to show the expected output. Could anyone help me with this?

    Any help is appreciated.

    Thanks in advance

    VJ
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-08-2021
    Location
    Toronto
    MS-Off Ver
    2016
    Posts
    101

    Re: How to group lookup values for SUMIFS when using Data validation list

    nvm guys.

    I added a helper column in the source "Data" Sheet to denote which Products are Legacy and tweaked the SUMIFS formula with this new column and it worked. I've attached the file with the updated formula and column.

    thanks to anyone who had already started working on this.

    VJ
    Attached Files Attached Files

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: How to group lookup values for SUMIFS when using Data validation list

    You could use this formula in C4:

    =IF($A$1="Legacy",SUM(SUMIFS(Data!$C:$C,Data!$A:$A,$B4,Data!$B:$B,{"A","B"})),SUMIFS(Data!$C:$C,Data!$A:$A,$B4,Data!$B:$B,$A$1))

    then copy down as required.

    Hope this helps.

    Pete

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: How to group lookup values for SUMIFS when using Data validation list

    Try

    =IF($A$1="Legacy",SUMPRODUCT(SUMIFS(Data!$C$2:$C$11,Data!$A$2:$A$11,Summary!B4,Data!$B$2:$B$11,{"A","B"})),SUMIFS(Data!$C$2:$C$11,Data!$A$2:$A$11,Summary!B4,Data!$B$2:$B$11,Summary!$A$1))
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: How to group lookup values for SUMIFS when using Data validation list

    My formula does not require that helper column of yours.

    Pete

  6. #6
    Forum Contributor
    Join Date
    06-08-2021
    Location
    Toronto
    MS-Off Ver
    2016
    Posts
    101

    Re: How to group lookup values for SUMIFS when using Data validation list

    Pete and John

    Appreciate the help you guys. I will try both your formula and see how it works out in my original report.

    VJ

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,723

    Re: How to group lookup values for SUMIFS when using Data validation list

    Glad it worked for you - thanks for the rep.

    Pete

+ 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. Data validation list with lookup
    By sajarac in forum Excel General
    Replies: 22
    Last Post: 02-20-2021, 02:58 PM
  2. [SOLVED] Lookup based on data validation list
    By sjgidman82 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-10-2019, 01:05 PM
  3. Data Validation List Associated with a Cell Value Lookup
    By kishoremcp in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-29-2018, 02:15 PM
  4. Merge or group cells with same data / data validation drop down list
    By Chris Fawcett in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-06-2015, 10:59 AM
  5. Lookup in a Data Validation List
    By Simon.xlsx in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-28-2014, 09:23 AM
  6. Create data validation based on lookup to get a list
    By Rocky2013 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-16-2013, 11:31 AM
  7. VBA for variable lookup from data validation list
    By Ravenous in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-15-2013, 01:03 AM

Tags for this Thread

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