+ Reply to Thread
Results 1 to 10 of 10

How to return a range of values based on Multiple Criteria

  1. #1
    Registered User
    Join Date
    03-17-2020
    Location
    Charlotte, NC
    MS-Off Ver
    MS Office 365
    Posts
    5

    How to return a range of values based on Multiple Criteria

    Hi. New to this forum and hoping for help. I have a spreadsheet with over 800,000 vehicle part fitments. I need to find the year range for each part number based on multiple matching criteria. If columns A, B, C, D and E match, then I would like it to return the low to high value of column F. Here is an example screenshot. In yellow is what I would like the function to return.

    Thank you in advance for any help.
    function example.png

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,447

    Re: How to return a range of values based on Multiple Criteria

    Hi Jamster and welcome to the forum,

    I'd be trying a Filter In Place tool. You need to learn how to build a Criteria for an Advanced Filter first. Then I'd add a double click on what remained to do more filtering. Have you ever used the Advanced Filter Tool in the Data Tab?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    03-17-2020
    Location
    Charlotte, NC
    MS-Off Ver
    MS Office 365
    Posts
    5

    Re: How to return a range of values based on Multiple Criteria

    Thank you so much for answering so quickly. I have not. That would all be new to me, sadly. But I am (somewhat) quick at learning new things in Excel.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,447

    Re: How to return a range of values based on Multiple Criteria

    OK Jamster,

    I went crazy building you an app using double click and Advanced filter. You should take my attached file and copy and paste your real data into columns A through F. I've built some fake data to use and test my code.....

    Here is what the code does.... It does an Advanced filter of your data in Columns A to F using a Criteria range in Columns H to M. The answer shows in Columns O through T
    BUT I've added code to have you double click on what you want to filter by. So if you double click On Ford, it will only show Ford in the Filter Area. Now in either the original or filtered area you can double click on Mustang and it will only show "Ford and Mustang" in the filtered area. This is really cool if you do this a lot.

    To clear the criteria area double click on Row 1 of the Criteria area (Columns H through M). To clear the Filter area double click on the top row of it .
    Give this file a try with the fake data. Ask questions. Copy your read data into this workbook. Ask questions...
    Parts AdvFilter on Double Click for Jamster.xlsm

  5. #5
    Registered User
    Join Date
    03-17-2020
    Location
    Charlotte, NC
    MS-Off Ver
    MS Office 365
    Posts
    5

    Re: How to return a range of values based on Multiple Criteria

    First thank you! This is awesome and it is helpful with another problem I was having! But, I need to get that year range added to my current spreadsheet. Is there a way to add that year range without having to filter them and add manually? Thank you again!

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,447

    Re: How to return a range of values based on Multiple Criteria

    OK Jamster,

    I've added a new column with a formula to show "Year Range". All columns but Year must match and it will give the Min Year - Max Year.

    See if this works to make your parts lookup faster.
    Parts AdvFilter on Double Click for Jamster w Year Range.xlsm

    To find parts for cars down on the list you might use the CTRL+F (Find Dialog). You might type in "Sprinter" and it might take you to row 7000. You would double click on the word and it will filter like it should. It might be helpful to have some dropdown lists in the criteria range of all possible car Makes. I'd need some better real data to build those dropdown lists.

    Hope this works for you. I know how many auto parts there are and there are very few standards.

  7. #7
    Registered User
    Join Date
    03-17-2020
    Location
    Charlotte, NC
    MS-Off Ver
    MS Office 365
    Posts
    5

    Re: How to return a range of values based on Multiple Criteria

    Hey there. I am so sorry I disappeared. This Virus is making my world a bit crazy. I hope you are staying healthy!

    So this is awesome but...is there a way to make that range appear next to all rows without having to filter it? Needing to filter this spreadsheet down to just the product number, make, model, submodel, liter and then have the year range. That is the ultimate goal.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,363

    Re: How to return a range of values based on Multiple Criteria

    As to having the "range appear next to all rows" in columns A:F of Marvin's file (post #6)
    1. Insert a new column G.
    2. Select cell V2
    3. Press the Ctrl + c keys
    4. Select cell G2
    5. Press the Ctrl + v keys
    6. Double click the fill handle to copy down
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Registered User
    Join Date
    03-17-2020
    Location
    Charlotte, NC
    MS-Off Ver
    MS Office 365
    Posts
    5

    Re: How to return a range of values based on Multiple Criteria

    Ok I think I finally got it! Thank you both. And thank you MarvinP for taking the time to build this for me. I sincerely appreciate your time and help!

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2504
    Posts
    19,363

    Re: How to return a range of values based on Multiple Criteria

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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. Return values based on multiple criteria
    By mmchaley in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-09-2020, 02:03 PM
  2. [SOLVED] Return multiple values in a list based on multiple criteria
    By yuvalmoshe in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-13-2020, 09:54 AM
  3. [SOLVED] Return Values based upon multiple criteria
    By frustrated in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-17-2016, 08:56 AM
  4. Formula to return values based on criteria and date range
    By jr217 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-28-2014, 06:20 AM
  5. [SOLVED] How to return multiple values to a single cell based on multiple criteria
    By lwallace in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-20-2014, 06:32 AM
  6. Replies: 2
    Last Post: 03-03-2014, 10:03 PM
  7. Replies: 10
    Last Post: 02-19-2013, 12: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