+ Reply to Thread
Results 1 to 6 of 6

Find specific value in Row, Return Text from Adjacent Cell

  1. #1
    Registered User
    Join Date
    08-19-2013
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2010
    Posts
    3

    Find specific value in Row, Return Text from Adjacent Cell

    Hi there,

    This seems like it should be a simple procedure and maybe I haven't had enough coffee yet this morning, but I can't figure out how to do this for the life of me.

    Within a specific defined set of cells in a row of data, I want to search for whichever cell has the number "10" in it. I want then to return the text of whatever cell is immediately to the left of that cell that had the number 10.

    Can someone please help me with this?

    Thank you in advance.

  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,936

    Re: Find specific value in Row, Return Text from Adjacent Cell

    Hi, welcome to the forum

    Are you looking for 10 in a row of cells?
    =index(1:1,match(10,1:1,0-1)

    or do you want to search down a column, and find the row that has 10 in it?
    =index(A:A,match(10,B:B,0))

    If this does not help you, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    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

  3. #3
    Registered User
    Join Date
    08-19-2013
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Find specific value in Row, Return Text from Adjacent Cell

    Thank you for the response! I've actually been around the forum for a couple of years now, but I've never had to post as I've always been able to get an answer by searching threads - this is the first time I wasn't able to find the answer on my own. I love this forum!

    Attached is an example of the data set I'm working with. Each row is the data from a specific baseball game. The player ID, player name, and position played for each of the players on the Away team are listed in columns DB:EB. I want to find who played a specific position in each game. In this case, I want to know who played position "10" (designated hitter) on the Away team.

    To do that, I need Excel to search for the number 10 within that set of data on row 2 between columns DB and EB, and then return the name of the player listed immediately to the left of that number 10. In the attached example, the formula should return the name "Harmon Killebrew."

    I hope this makes sense.

    Thank you!

    EXAMPLE 1.xlsx
    Last edited by oneforfive; 07-21-2015 at 02:42 PM.

  4. #4
    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,936

    Re: Find specific value in Row, Return Text from Adjacent Cell

    yOU ALMOST HAD IT...
    =INDEX(DB2:EB2,MATCH(10,DB2:EB2,0)-1)

    Note that you have more that 1 10 in row 2, that will ONLY pick up the 1st 1

  5. #5
    Registered User
    Join Date
    08-19-2013
    Location
    Pacific Northwest
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Find specific value in Row, Return Text from Adjacent Cell

    Aha!! Thank you so much!

  6. #6
    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,936

    Re: Find specific value in Row, Return Text from Adjacent Cell

    Awesome. What the -1 does, is move back 1 cell from what the MATCH finds, so it has to be outside the MATCH

+ 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. [SOLVED] Find text in column and return adjacent cell
    By frostii in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 06-27-2015, 07:44 PM
  2. Replies: 6
    Last Post: 03-06-2013, 03:30 PM
  3. Find text in array & return adjacent cell value
    By econbizer in forum Excel General
    Replies: 13
    Last Post: 10-13-2012, 01:26 AM
  4. [SOLVED] Find text in a column or range and return value of adjacent cell
    By chemoul in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-20-2012, 04:30 AM
  5. [SOLVED] Find Specific Text in Text String and Return Value in Adjacent Column
    By watchouse in forum Excel General
    Replies: 2
    Last Post: 07-11-2012, 03:53 PM
  6. Find and Match Text in Column Return Adjacent Cell
    By biancam in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-11-2012, 02:45 PM
  7. Find specific text in column and return cell value from its immediate right
    By cneff in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-08-2012, 07:59 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