+ Reply to Thread
Results 1 to 10 of 10

check if text in cell is available in a column

  1. #1
    Registered User
    Join Date
    03-28-2017
    Location
    Australia
    MS-Off Ver
    2003
    Posts
    3

    Lightbulb check if text in cell is available in a column

    I am using excel 2003.

    I have the following -

    Column A

    Column A has the following –
    A1 - 3
    A2 - 5
    A3 - 7
    A4 - 4

    Column B has the following –
    B1 roger
    B2 kenny
    B3 harry
    B4 bernard

    Column C - Is not static as I keep pasting new lines of text into column C once everyday.
    Column C example in first paste is -
    C1 big roger
    C2 where is kenny
    C3 harry went away
    C4 lion


    Column D - Column D is where I want to use the formulae.
    I want each row in the text in Column C to be compare with Column B. If there is a section of text in column C1 that matches cell range B1:B4, then the value of the corresponding row in column A1 need to be displayed in Column D1 .

    For example -
    I paste “big roger” in cell C1. Now the formulae need to check if either of the words “big” or “roger” is contained within cell range B1:B4. So if just the word “roger” is there in B1, the corresponding A column’s value “3”. Will be displayed in cell D1.

    I have come close with the following formulae –

    =IF(COUNTIF($A$1:$A$4,C1)=1,D1,FALSE)

    However C1 in the formulae needs to consider “big roger” and then compare it with B1:B4 “roger”. I need to be able to paste new text in C1 and still get the comparison results displayed in cell D1

    There are many websites explaining how to insert “ big roger” into the formulae itself and then compare it with other columns but that is not what I want.
    Last edited by dxr346; 03-28-2017 at 09:29 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: formulae

    Please amend your thread title. see rule 1, below.

    1. Use concise, accurate thread titles. Your post title should describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice. To change the title of the thread, click EDIT on the original post, then click the Go Advanced button, then change the title.

    Also...

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    03-28-2017
    Location
    Australia
    MS-Off Ver
    2003
    Posts
    3

    Re: formulae

    There is no option to edit the title under edit.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: formulae

    I've just checked it out. Edit/go Advanced and scroll up a bit. There's the title and it's editable.

  5. #5
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    414

    Re: formulae

    This may not be the most elegant solution but it works..

    The following formula in D1 will give the required result:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Assuming that the lookup phrase will have only maximum of three words

    If there are more, adjust the range in ROW(INDIRECT("1:3") to suit.


    Experts here maybe able to reduce this formula further..

    Also attached file

  6. #6
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    414

    Re: formulae

    Sorry AliGW, didnt see your instruction...

  7. #7
    Registered User
    Join Date
    03-28-2017
    Location
    Australia
    MS-Off Ver
    2003
    Posts
    3

    Re: check if text in cell is available in a column

    Have amended.

  8. #8
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    414

    Re: check if text in cell is available in a column

    Hi dxr346,

    Please see attached file and check if it works for you.

    This formula in D1 ( Array - Entered)

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Assuming that there will be only maximum of 3 words in your lookup. If there are more adjust this portion ROW(INDIRECT("1:3") in the formula

    Thanks
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: check if text in cell is available in a column

    Hi All,

    another appoach:

    =SUMPRODUCT(ISNUMBER(SEARCH(B$1:B$4,C1))*A$1:A$4)

    If "no match" formula returns 0.


    Regards
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  10. #10
    Forum Contributor
    Join Date
    07-12-2015
    Location
    Dubai,UAE
    MS-Off Ver
    Office 365
    Posts
    414

    Re: check if text in cell is available in a column

    Quote Originally Posted by canapone View Post

    =SUMPRODUCT(ISNUMBER(SEARCH(B$1:B$4,C1))*A$1:A$4)

    Regards
    Wow!!
    So simple....

+ 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. Searching TEXT in formulae, rather than results of formulae
    By Niek Otten in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 06:05 AM
  2. Searching TEXT in formulae, rather than results of formulae
    By Niek Otten in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  3. [SOLVED] Searching TEXT in formulae, rather than results of formulae
    By AndyE in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  4. [SOLVED] Searching TEXT in formulae, rather than results of formulae
    By AndyE in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  5. Searching TEXT in formulae, rather than results of formulae
    By AndyE in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  6. Searching TEXT in formulae, rather than results of formulae
    By AndyE in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  7. Searching TEXT in formulae, rather than results of formulae
    By AndyE in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. [SOLVED] Searching TEXT in formulae, rather than results of formulae
    By AndyE in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-15-2005, 06:05 AM

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