+ Reply to Thread
Results 1 to 7 of 7

Match or Search formula

  1. #1
    Forum Contributor
    Join Date
    08-09-2006
    Posts
    147

    Match or Search formula

    =IF(ISNUMBER(SEARCH(H3,Sheet1!B:B,0)),INDEX(Sheet1!E:E,SEARCH(H3,Sheet1!B:B,0)),H3)

    I have two sheets in my workbook. One sheet has the names as a column with first name and a column with last name. My other sheet has a column with first middle and last name.

    I want to search the last name and if you find it return whatever is in column E.

    Column H is first middle and last
    Sheet1 Column B is last name. And, Sheet1 Column E is the department.

    What is wrong with my formula above.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    Please Login or Register  to view this content.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    08-09-2006
    Posts
    147

    Sort of worked

    It worked better than mine did, however, it's pull the top record for every entry.

    Example: If I search for Ray Jones it pull the department on the first line of the sheet. And, it pulls that same infor for every record.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by rlkerr
    It worked better than mine did, however, it's pull the top record for every entry.

    Example: If I search for Ray Jones it pull the department on the first line of the sheet. And, it pulls that same infor for every record.
    Not sure what that means?

    Attach a sample showing expected results.

  5. #5
    Forum Contributor
    Join Date
    08-09-2006
    Posts
    147

    Sorry! If I'm confusing you.

    Please see the attached.

    I hope this explains it.
    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Your data is reverse of what I interpreted from your initial post.

    You want to extract the last name and match it to the last name column in another sheet....

    You should do this with the help of a helper column..... see attached.

    In column Z I extracted the Last Name from column I and then I revised the formula in column Y to look at that extracted name.

    Formula to extract name:
    Please Login or Register  to view this content.
    Formula to find Match:
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    08-09-2006
    Posts
    147

    Talking Yes, That was it.

    Thank you. That worked well. Thanks for your time and expertise.

+ 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