+ Reply to Thread
Results 1 to 17 of 17

Formula For Using Cell Contents To Search Column, Return Results

  1. #1
    Registered User
    Join Date
    12-13-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    61

    Formula For Using Cell Contents To Search Column, Return Results

    I have two columns containing text strings. When I use B2 text string to search column A, I can find multiple matching cells. What I need is a formula in C2 that will return the cell in B:B that matches A:2. Thanks!

  2. #2
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Formula For Using Cell Contents To Search Column, Return Results

    Didn't get it... could you please post your Workbook?

  3. #3
    Registered User
    Join Date
    12-13-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Formula For Using Cell Contents To Search Column, Return Results

    Not sure how, but I have more information that I should have posted that might help.

    Every cell in column B is unique. As an example, B2 contains four words. Somewhere in column A, there is a cell or multiple cells that contain all four of those words. The words might be in a different order as well.

    I need a formula in C2 that will *display the cell in column B that matches A:2
    Last edited by portokie; 01-06-2016 at 02:01 PM. Reason: grammar

  4. #4
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Formula For Using Cell Contents To Search Column, Return Results

    Like that?

    Please Login or Register  to view this content.
    Without the Workbook is hard to see what you really need

  5. #5
    Registered User
    Join Date
    12-13-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Formula For Using Cell Contents To Search Column, Return Results

    That didn't work. I don't really have the data, I'll do my best to recreate here:

    A2="text word1 word2 text"
    A3="text word5 word3 text"

    B2="word3 word5"
    B3="word1 word2"

    if you notice, A2 matches B3 and A3 matches B2 (even though the phrase is not correct, the words still match).

    I am essentially taking the words from B2 and searching column A with them.

    C2=need formula to display B3
    C3=need formula to display B2
    Last edited by portokie; 01-06-2016 at 02:31 PM. Reason: fixed error

  6. #6
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Formula For Using Cell Contents To Search Column, Return Results

    For real... it is very hard to understand

    Post a sample workbook my friend

  7. #7
    Registered User
    Join Date
    12-13-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Formula For Using Cell Contents To Search Column, Return Results

    As I said, I don't have the data and I don't know how/don't want to upload one of our office files (don't know what metadata might be included, and they aren't mine to share). This example is the best I can do. I truly appreciate your effort, but I don't know how to make what I'm asking any clearer, sorry.

    column A column B column C
    text word1 word2 text word3 word5 formula to display the cell from column B that matches A2 (B3)
    text word5 word3 text word1 word2 formula to display the cell from column B that matches A3 (B2)
    Last edited by portokie; 01-06-2016 at 02:49 PM. Reason: fixed table

  8. #8
    Registered User
    Join Date
    12-13-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Formula For Using Cell Contents To Search Column, Return Results

    So if a cell from column B matches A2 (in this case B3), then display B3 in C2.
    If a cell from column B matches A3 (in this case B2, even though the words are in a different order, they still match), then display B2 in C3.

  9. #9
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Formula For Using Cell Contents To Search Column, Return Results

    Got it... but trying to figure out how to solve it

    Give me time

  10. #10
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Formula For Using Cell Contents To Search Column, Return Results

    Hello again

    Try this on C2 (and bellow)

    Please Login or Register  to view this content.
    CTRL + SHIFT + Enter instead of simple Enter

  11. #11
    Registered User
    Join Date
    12-13-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Formula For Using Cell Contents To Search Column, Return Results

    Wow! That worked! But instead of displaying "B3 matches with A2", is there a way to just display the contents of B3 in C2?

    Amazing job though! Thank you so much for your patience and for helping me with this!

  12. #12
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Formula For Using Cell Contents To Search Column, Return Results

    Oh ok!

    Use this one then:

    Please Login or Register  to view this content.
    Don't forget to CTRL+SHIFT+Enter

    By the way, if it solves your problem, please mark the thread as [SOLVED] and add reputation

  13. #13
    Registered User
    Join Date
    12-13-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Formula For Using Cell Contents To Search Column, Return Results

    Oh wait, it didn't work actually. Sorry, I tried it on the data I was working on and it seemed to work, but when I tried it on my example sheet above, C2 returned an error, while C3 returned the correct result. The problem is I need to search column A using the 'individual words' in B2, not the exact cell contents. For example, if you copy/paste the contents of B2 into the google search bar, it will return results containing both keywords without paying attention to the order the words are in.

  14. #14
    Valued Forum Contributor Gatti's Avatar
    Join Date
    06-08-2015
    Location
    Brasil, São Paulo, Ribeirão Preto
    MS-Off Ver
    365
    Posts
    346

    Re: Formula For Using Cell Contents To Search Column, Return Results

    Oh well... thats a huge "but"

    Thought you was going to search the words in the right order

    Like, if in Column A the words are "AAAA BB CCCC DDDDD", the searching words would be "BB CCCC", not "CCCC BB"

    Back to clipboard...

    Btw: The max words to search for are 2? Are you going to search for more than 2 in same cel?

  15. #15
    Registered User
    Join Date
    12-13-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Formula For Using Cell Contents To Search Column, Return Results

    Your last post worked as intended, but still can't search individual words from column B cells. I will definitely mark as solved and add to your rep though. Thanks again!

  16. #16
    Registered User
    Join Date
    12-13-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Formula For Using Cell Contents To Search Column, Return Results

    There is no limit on the amount of words in B cels, but a conservative word limit might be 25, and that would still match a cel in column A. But you are definitely understanding now. To expound on your thoughts:

    If in Column A the words are "AAAA BB CCCC DDDDD", the searching words in B cel MIGHT be "BB CCCC" OR "CCCC BB" or even "DDDDD BB AAAA".
    Last edited by portokie; 01-06-2016 at 05:08 PM. Reason: grammar

  17. #17
    Registered User
    Join Date
    12-13-2012
    Location
    Portland, OR
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: Formula For Using Cell Contents To Search Column, Return Results

    Still haven't found a way to do this...

+ 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] Search column for entered value and return results to textbox in userform
    By MIFF3436 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-11-2015, 06:35 AM
  2. Replies: 3
    Last Post: 07-17-2013, 03:41 AM
  3. [SOLVED] Formula to search a column for a specific value, and return the value in the next cell
    By TimothyD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-26-2013, 12:02 AM
  4. [SOLVED] search text of cell in a range and return the contents in the corresponding column
    By kumail in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-18-2013, 06:42 PM
  5. fetching data from search results from a website using cell contents?
    By Cutters in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-02-2012, 07:29 AM
  6. Search Text of Cell in a range and return the contents
    By knowing in forum Excel General
    Replies: 8
    Last Post: 11-19-2012, 08:57 AM
  7. Return Cell Contents by Sheet Name Search
    By gratedwasabi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-26-2012, 10:45 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