+ Reply to Thread
Results 1 to 5 of 5

Select multiple criteria and return multiple results

  1. #1
    Registered User
    Join Date
    09-05-2011
    Location
    Ryther, England
    MS-Off Ver
    Office 365
    Posts
    63

    Select multiple criteria and return multiple results

    Hi guys

    I'm looking for some help with a multiple criteria search function. My database is arranged as follows:

    Sheet 1
    Column A - list of names
    Row 1 - Days of the week
    For each name and day there is a time slot entered (AM, PM, All day) that indicates each individuals availability for each day of the week.

    Sheet 2
    Cell A2 - Drop down of days of the week
    Cell B2 - drop down for time slots

    What I want to be able to do is select a day of the week in cell A2 and a time slot in cell B2 and it return all available names in column C that match the criteria.

    I've attached a sample database to illustrate my request. If there is a VBA option for this that would be great as well.

    As always any help you can offer is greatly appreciated.

    Regards

    Mac
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Select multiple criteria and return multiple results

    write at sheet2 C2 array formula
    {=IFERROR(INDEX(Sheet1!$A$2:$A$4;SMALL(IF(Sheet1!$B$1:$F$1&Sheet1!$B$2:$F$4=$A$2&$B$2;ROW($B$2:$F$4)-1);ROW(1:1)));"")}

    copy down
    Attached Files Attached Files

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Select multiple criteria and return multiple results

    Try this array formula**:

    =IFERROR(INDEX(Sheet1!A:A,SMALL(IF(INDEX(Sheet1!B$2:F$4,,MATCH(A$2,Sheet1!B$1:F$1,0))=B$2,ROW(Sheet1!B$2:F$4)),ROWS(C$2:C2))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    09-05-2011
    Location
    Ryther, England
    MS-Off Ver
    Office 365
    Posts
    63

    Re: Select multiple criteria and return multiple results

    Hi guys

    Thank you. Worked perfectly

    Regards

    Mac

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Select multiple criteria and return multiple results

    You're welcome. Thanks for the feedback!

+ 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