+ Reply to Thread
Results 1 to 4 of 4

Return list of cells in Col 3 that match both values in Col1 and 2

  1. #1
    Registered User
    Join Date
    07-01-2011
    Location
    Australia
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    38

    Return list of cells in Col 3 that match both values in Col1 and 2

    I want to get a list of each of the cells in Column 3 that matches paired values of columns 1 and 2. e.g. In the attached spreadsheet I want a list of all the facilities that are in NSW and Region 5 (R5). i.e. P16, P17, P17, P18, P19, P20 all in a list.

    Can somebody please help?

    Thanks,
    Zac
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Return list of cells in Col 3 that match both values in Col1 and 2

    Hi,

    First of all, go to Name Manager and define a new name called A3_Absolute and in the Refers to: box type this formula: ='Base Data'!$A$3

    In cell E3 of your spreadsheet, enter this array formula (confirm with CTRL+SHIFT+ENTER, not just ENTER):

    =IFERROR(INDEX([Facility Name],SMALL(IF(([State]="NSW")*([Region]="R5"),ROW([State])-MIN(ROW([State]))+1),ROWS(A3_Absolute:[@State])),1),"")

    Note: this will give you your desired results for State=NSW and Region=R5, though if you are wanting to get the results for other combinations also, then, rather than manually amending the relevant parts of the formula each time, it would be better to e.g. set up another table for your desired results (i.e. with a column for State and a column for Region) so that you can replace the "NSW" and "R5" with cell references.

    P.S. If anyone can come up with a better way of making structured row references absolute (I had to use a defined name for cell A3 to keep it absolute in this case), please let me know. I searched around a bit and couldn't find a better solution (see links below).

    This example would seem to justify my personal decision to avoid structured references in any case!

    http://answers.microsoft.com/en-us/o...4-87ceb462813c

    http://www.excelcampus.com/tips/abso...uctured-table/

    Hope that helps

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    07-01-2011
    Location
    Australia
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    38

    Re: Return list of cells in Col 3 that match both values in Col1 and 2

    I just realised that I never replied to this post - my apologies for that - how rude.

    I am still using this formula more than 1 year on. Thanks for your help it has made things much more simple for me.

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Return list of cells in Col 3 that match both values in Col1 and 2

    No worries! Better late than never!

    Thanks for eventually getting back.

    Cheers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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