+ Reply to Thread
Results 1 to 7 of 7

Search Rows of Data to Find a Match when Match Location Varies by Column and Return Row #

  1. #1
    Registered User
    Join Date
    09-02-2015
    Location
    Ohio
    MS-Off Ver
    2010
    Posts
    8

    Search Rows of Data to Find a Match when Match Location Varies by Column and Return Row #

    I have a list of what I call id's in Column A (Ex id="10230" ), then in columns C through NA I have data. Each row from column C to NA contains a cell that also has id that exactly matches one of the ids in my A column. The problem is the Id is almost never in the same column, meaning the matching id for A1 might be in J1023 while the matching id for A2 might be in BB15. There is only one id per row in the C though NA column. There are also empty cells and some rows are longer than others.

    In Column B I want to find the row # which contains the matching id as the associated A Column id.

    Column A
    ex: id="10230"

    Column B
    this will be the row # that contains the same id as ColumnA (What we are trying to find)

    Column C .... Column NA
    various letters and numbers of data one of the cells is an id

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

    Re: Search Rows of Data to Find a Match when Match Location Varies by Column and Return Ro

    Can you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

    Also, would using a helper column be an option?
    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
    09-02-2015
    Location
    Ohio
    MS-Off Ver
    2010
    Posts
    8

    Re: Search Rows of Data to Find a Match when Match Location Varies by Column and Return Ro

    I uploaded the first 5 rows of my data. Column A has the id's, column B is blank, and from Columns C and on - are the "data" If you see in row 1, the location of the id is at GV1, row2 the id is at HB2 and so on.

    In Column B, I want to find which row of "data" contains the id that matches the id in Column A.


    By a helper column do you mean just having a column that has a 1 in row 1, a 2 in row 2, a 3 in row 3 ... and so on? If so yeah



    Let me know if I can clear anything else up, or if I did a bad job at trying to explain.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-02-2015
    Location
    Ohio
    MS-Off Ver
    2010
    Posts
    8

    Re: Search Rows of Data to Find a Match when Match Location Varies by Column and Return Ro


  5. #5
    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,926

    Re: Search Rows of Data to Find a Match when Match Location Varies by Column and Return Ro

    Here is what I have for you.

    1. I inserted a new column (a helper) after B, and put this in (the new) C1, and copied this down...
    C1=INDEX($D1:$HO1,MATCH("id*",$D1:$HO1,0))
    2. B1=MATCH(A1,$C$1:$C$5,0)

    (becasue none of your ID's matched, I changed the ID in BI3 from id="40001" to id="02130" so we had something to test with)

    A
    B
    C
    1
    id="40001"
    3
    id="02185"
    2
    id="53001"
    #N/A
    id="02188"
    3
    id="55001"
    #N/A
    id="40001"
    4
    id="45003"
    #N/A
    id="02201"
    5
    id="37003"
    #N/A
    id="02280"

  6. #6
    Registered User
    Join Date
    09-02-2015
    Location
    Ohio
    MS-Off Ver
    2010
    Posts
    8

    Re: Search Rows of Data to Find a Match when Match Location Varies by Column and Return Ro

    Works perfectly, I really appreciate it!

  7. #7
    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,926

    Re: Search Rows of Data to Find a Match when Match Location Varies by Column and Return Ro

    Happy to help, 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)

Similar Threads

  1. Replies: 2
    Last Post: 07-18-2015, 05:19 PM
  2. Replies: 3
    Last Post: 03-21-2014, 03:29 AM
  3. Replies: 3
    Last Post: 01-03-2014, 08:03 PM
  4. Match data from 2 rows then return result from 2nd row different column
    By urbanassassin in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-15-2013, 12:28 PM
  5. Match string in one column, return value in same row, skip rows that down't match
    By anilsen0711 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-01-2013, 05:35 AM
  6. [SOLVED] Two Excel sheets trying to match text data and return the match from the second column!
    By bankcott in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-02-2013, 02:17 PM
  7. MATCH function where the search term varies
    By jbortfeld in forum Excel General
    Replies: 1
    Last Post: 02-09-2005, 03:06 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