+ Reply to Thread
Results 1 to 8 of 8

INDEX/MATCH? - Return Value to left with IF function

  1. #1
    Registered User
    Join Date
    03-21-2013
    Location
    Ohio, US
    MS-Off Ver
    Excel 2007
    Posts
    8

    INDEX/MATCH? - Return Value to left with IF function

    I'm just starting to wrap my head around the INDEX/MATCH function but can't quite get it, especially when trying to include an IF function. Not entire sure what I'm looking to do can be done so I'm challenging the experts.

    I'm looking to run a formula that says, "if you find a "Yes", return anything to the left of it". Using the example below, the hope is to return a list of Red, Green, and Orange.

    The below will give me "Red" but I'm struggling with how to relate this to the rest of the list. When I drag it down, I only get "Red" on the other "Yes" responses.

    =IF(B1="Yes",INDEX($A$1:$A$6,MATCH(B1,$B$1:$B$6,0)))

    A B
    1 Red Yes
    2 Blue No
    3 Green Yes
    4 Purple No
    5 Yellow No
    6 Orange Yes


    Thanks in advance for your help!

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: INDEX/MATCH? - Return Value to left with IF function

    what about filtering column B for "Yes", would that fill your need?

  3. #3
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: INDEX/MATCH? - Return Value to left with IF function

    If you're looking for a formula to drag down, then all you need is:

    Please Login or Register  to view this content.
    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: INDEX/MATCH? - Return Value to left with IF function

    If you're trying to get cell C1 to return the concatenated list of Col_A values where the Col_B cell contains Yes (Red, Green, Orange)...Excel does an exceptionally poor job of concatentating matching items. Either the formula quickly becomes too unwieldy to work with or you end up needing VBA to sort out the values. Consequently, I'd recommend another approach.

  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: INDEX/MATCH? - Return Value to left with IF function

    Is this what you're wanting to do?

    Data Range
    A
    B
    C
    D
    1
    Red
    Yes
    Red
    2
    Blue
    No
    Green
    3
    Green
    Yes
    Orange
    4
    Purple
    No
    5
    Yellow
    No
    6
    Orange
    Yes
    7
    ------
    ------
    ------
    ------


    This array formula** entered in D1:

    =IFERROR(INDEX(A:A,SMALL(IF(B$1:B$6="Yes",ROW(B$1:B$6)),ROWS(D$1:D1))),"")

    ** 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.

  6. #6
    Registered User
    Join Date
    03-21-2013
    Location
    Ohio, US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: INDEX/MATCH? - Return Value to left with IF function

    Thanks to everyone who responded. Because I'm pulling from one sheet to another, filtering won't work. A simple IF function doesn't provide the results in the format I'm looking for.

    That said, special and HUGE THANK YOU to Tony Valko who NAILED IT. Exactly what I was looking for!!

  7. #7
    Registered User
    Join Date
    03-21-2013
    Location
    Ohio, US
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: INDEX/MATCH? - Return Value to left with IF function

    Thanks so much, Tony. EXACTLY what I was looking for!

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

    Re: INDEX/MATCH? - Return Value to left with IF function

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ 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. How to: Return next value w/ same # in index match large function?
    By Yoshi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2015, 02:35 AM
  2. [SOLVED] Index + Match to return result with Left function
    By Groovicles in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-21-2014, 02:35 PM
  3. [SOLVED] Left Function in Combination with IF, LOOKUP, MATCH, or INDEX?
    By superwhoever in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 10-29-2012, 01:31 AM
  4. Replies: 2
    Last Post: 06-14-2010, 02:04 AM
  5. [SOLVED] Error Return Value from and INDEX(A:2,MATCH()) function
    By BJ in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-26-2005, 11:06 AM

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