+ Reply to Thread
Results 1 to 16 of 16

Search

  1. #1
    Registered User
    Join Date
    10-25-2010
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    9

    Search

    I am trying to search a cell for a tex phrase from another cell

    Column A
    21STC54
    3DALU14

    Column B
    21STC53;SM|MOD|PORTAL;Accounts Payable;Accounts;Payable;21ST CENTURY BUILD LTD;UNIT 5 GAMMA;TODDINGTON;UK;GL54 5EB;;1;EN

    21STC54;SM|MOD|PORTAL;Accounts Payable;Accounts;Payable;Alderwood Construction Ltd;Unit 5 Gamma;Toddington;UK;GL54 5EB;[email protected];1;EN

    If colum A cell is in column b then True if not False
    Last edited by electra109; 10-30-2010 at 04:29 PM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Search

    Hi and welcome to the board
    Do you want to search the entire range in col B for values in A or only values in the same row?
    Could there be more than 1 value in col B found in one cell in col A?
    And if so what should the result be ? Only true or false?

  3. #3
    Registered User
    Join Date
    10-25-2010
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Search

    Quote Originally Posted by arthurbr View Post
    Hi and welcome to the board
    Do you want to search the entire range in col B for values in A or only values in the same row?
    Could there be more than 1 value in col B found in one cell in col A?
    And if so what should the result be ? Only true or false?
    I need to search the entire range in Column B

    There will be only one value in Coulmn that would match Column A

    Column A has about 200 rows, Column B has 5000 rows.

    I need to see if the Account in Col A is in ColB

    The result only needs to be True or False

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,578

    Re: Search

    Assuming your data starts in row 2,

    =ISNUMBER(MATCH("*"&A2&"*",$B$2:$B$500,0)) dragged down.
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search

    Maybe this in C1 copied down:

    =SUMPRODUCT(--(LEFT($B$1:$B$5000,7)=A1))>0
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  6. #6
    Registered User
    Join Date
    10-25-2010
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Search

    Thats Great
    Is it possible for the result to show the text in Column B
    So if the account in Column A exsits in Column B then Column C where the function is would show the record from Column B

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search

    =if(sumproduct(--(left($b$1:$b$5000,7)=a1))>0, b1, "")

  8. #8
    Registered User
    Join Date
    10-25-2010
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Search

    Sorry that does not seem to work, it is not shwoing the correct row

    Also I have just noticed some accounts are 8 characters long
    Attached Files Attached Files

  9. #9
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search

    Guess I misunderstood the question. A good sample workbook not only shows the sample data, but it shows a manually mocked up example of the results desired.

    Does this do what you want using ChemistB's match suggestion?

    =IF(ISNUMBER(MATCH("*" & A1 & "*",B:B, 0)), INDEX(B:B, MATCH("*" & A1 & "*",B:B, 0)), "")

  10. #10
    Registered User
    Join Date
    10-25-2010
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Search

    Thanks very that worked great.
    Wondered if you couls help on the last bit of formatting i have to do.
    I need in insert an email address into each account.
    I have tried with Left and Right string but not sure how to put it all together.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    10-25-2010
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Search

    I have used the function =C1&(RIGHT(E1,5)) to put the email address in.
    How do I then combine the two text cells

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search

    Maybe this:

    =LEFT(D1,FIND(";;",D1)) & C1 & RIGHT(D1,5)

  13. #13
    Registered User
    Join Date
    10-25-2010
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Search

    Great that works.
    Just one last question
    How do I Lookup each cell in a column for the symbol @ so I can sort the accounts with emails and the ones without

  14. #14
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search

    The formula shown would go in the first cell at the top of the data. Once entered, you copy that cell downward to the rest of your data rows and the formula will adjust itself.

    If I'm not understanding the question, again, show what you want to do in a sample workbook. I'm very visual.

  15. #15
    Registered User
    Join Date
    10-25-2010
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    9

    Conversion

    How can I convert the row that has seperate cells into one cell seperataed with ;

    spreadsheet attached to
    Attached Files Attached Files

  16. #16
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Search

    This sounds like a completely different question, you even gave this new post a new title.

    As per forum rules, each "topic" should be placed into new, appropriately titled threads of their own.

    ===========

    If your original need for this thread is answered, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    Then start your new thread for the new topic. New threads garner the most attention anyway, so this is always in your best interest.

+ 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