+ Reply to Thread
Results 1 to 2 of 2

Need help distilling a list of data by criteria... dynamic data sets.

  1. #1
    Registered User
    Join Date
    01-23-2014
    Location
    Sac-town
    MS-Off Ver
    Excel 2013
    Posts
    1

    Need help distilling a list of data by criteria... dynamic data sets.

    Folks, I have a problem that I am struggling to resolve.

    I have a list that is dynamic (the length of the list can change, so I have to accommodate the possibility that it grows or shrinks. I have that working properly, and it is properly populating the cells with data.

    I have been asked to take that list and distill it down based on criteria in the list. For example, the list has headers like this:

    Country State City Year {additional columns of data}

    What I need to do is generate a new list that focuses on a specific set of criteria, and combines the values of the rows that have the same criteria.

    For example,
    USA California Los Angeles 2020 {additional data in columns}
    USA California Los Angeles 2020 {additional data in columns}
    USA California Los Angeles 2022 {additional data in columns}
    USA California Los Angeles 2024 {additional data in columns}
    USA California Los Angeles 2020 {additional data in columns}
    USA California Los Angeles 2024 {additional data in columns}
    USA California Los Angeles 2026 {additional data in columns}

    The idea is to take the array above and sum all the columns to the right of the date, but do it based on the the values of the first four columns matching. So the final array will look like this:
    USA California Los Angeles 2020 {SUM OF additional data in columns}
    USA California Los Angeles 2022 {SUM OF additional data in columns}
    USA California Los Angeles 2024 {SUM OF additional data in columns}
    USA California Los Angeles 2026 {SUM OF additional data in columns}

    The rows that have all four columns on the left matching will be summed together, and the ones that are unique will still be there. So the new array will be smaller and will combine the individual lines that have the same test criteria. Since the starting data set is dynamic, this one will also be dynamic, and as long as there is some overlapping data, the new array will have fewer rows. Also, I do not want any duplicates. This has to be done in formulas, not through VBA.

    I don't care about the order of the rows, so I thought I would start by looking at the first row and then doing a SUMIF of the rest of the list. That would work for the first row, but after that, I have to check to make sure I haven't done the same criteria already and skip down to the next row of source info if I have. I'm not sure I can do this without some VBA...

    Suggestions on how to tackle this in a single cell formula?

    Thanks,

    ---Mjm6

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: Need help distilling a list of data by criteria... dynamic data sets.

    Hi, welcome to the forum

    Probably need to use COUNTIFS?

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Dynamic Data Validation List - 2 criteria
    By smartbuyer in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-07-2018, 05:14 AM
  2. [SOLVED] Show data with month criteria drop list (dynamic)
    By Jhon Mustofa in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-16-2014, 12:54 PM
  3. Replies: 3
    Last Post: 01-06-2014, 01:22 PM
  4. [SOLVED] Create Dynamic Data Validation List based upon Criteria
    By stubbsj in forum Excel General
    Replies: 6
    Last Post: 06-04-2012, 08:33 AM
  5. Replies: 0
    Last Post: 02-13-2012, 07:18 AM
  6. Replies: 3
    Last Post: 08-21-2011, 08:22 PM
  7. dynamic chart for multiple data sets
    By jrtaylor in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-13-2011, 10:36 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