+ Reply to Thread
Results 1 to 4 of 4

Search and Display certain text

Hybrid View

  1. #1
    Registered User
    Join Date
    01-15-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    18

    Search and Display certain text

    Hello,

    I am a newbie with Excel '13 and am trying to do a type of function to automate some searching. I have two lists on two separate tabs in a worksheet. Each tab has two columns with a code and a box it is associated with. I am trying to run a function that will search one list using the other as a reference to check for mistakes.

    For instance
    Tab 1
    A(code) - B(box) - C(function here)
    abc12 - hlx12 - Use A1(abc12) to search Tab2 A:A, found on A3 and returns B3, hlx11 - thus showing a mismatch and discrepancy
    abc99 - aex17 - Use A1(abc99) to search Tab2 A:A, not found - return blank or UNKN - to show there is no abc99 in tab2
    abc13 - aex14 - Use A1(abc13) to search Tab2 A:A, found on A2 and returns B2, aex14 - showing a good match
    abc14 - hub99 - Use A1(abc14) to search Tab2 A:A, found on A1 and returns B1, hub99 - showing a good match

    Tab 2
    A(code) - B(box)
    abc14 - hub99
    abc13 - aex14
    abc12 - hlx11

    Please help so I can do this without manually looking through 1000s of rows!
    Thank you,
    Jason

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Search and Display certain text

    Assuming both your data sets start in cell A1, try this in cell C1 on your Sheet1:

    C1:  =IFERROR(INDEX(Sheet2!B:B,MATCH(Sheet1!A1,Sheet2!A:A,0)),"")
    And drag down.

    Hope this helps!
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Registered User
    Join Date
    01-15-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    18

    Re: Search and Display certain text

    Quote Originally Posted by mcmahobt View Post
    Assuming both your data sets start in cell A1, try this in cell C1 on your Sheet1:

    C1:  =IFERROR(INDEX(Sheet2!B:B,MATCH(Sheet1!A1,Sheet2!A:A,0)),"")
    And drag down.

    Hope this helps!
    Worked like a charm!

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Search and Display certain text

    C1:
    =IFERROR(INDEX(Sheet2!B1:B50000,MATCH(A1,Sheet2!A1:A50000,0)),"UNKN")

    and copy down
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

+ 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 add a search option in userform and display it in text box
    By ruveenck in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2014, 04:33 AM
  2. [SOLVED] Filter Using User Form & Display the Whole Row of the Search Result on the Text boxes
    By Revolversus2 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2014, 02:28 AM
  3. formula to search for text and display all in single cell
    By gorelordz in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-28-2014, 12:12 AM
  4. Replies: 11
    Last Post: 11-03-2013, 09:16 PM
  5. Search Text for Value and Display a Value
    By LukeThorn in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-16-2012, 05:00 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