+ Reply to Thread
Results 1 to 6 of 6

Excel formula to find text from column B in column A

  1. #1
    Registered User
    Join Date
    08-28-2019
    Location
    Bucharest
    MS-Off Ver
    2016
    Posts
    2

    Excel formula to find text from column B in column A

    Hello,

    I have the following situation.
    In column A, I have many rows with let's say these values:
    A1."abc123"
    A2."abc143"
    A3."abc454"
    A4."abc566"
    etc
    In column B, I have many rows with text, and some of the rows will contain the exact text in the cells from column A.
    For example:
    B1."rfefhefeh abc123 efref"
    B2."dhfherf abc566 thhewd"
    B3."cjhuherffefehg abc454 gtgrhyjyu"
    B4."werfje abc999 fhvdhfe"

    Now, I need to highlight all cells in column A and all cells in column B that will match in values. In this example i need highlighted A1, A4, A3 and B1, B2, B3.
    Is there any way in which i can get this done for a sheet containing approximately 10000 rows?

    Thank you very much!!!

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Excel formula to find text from column B in column A

    Here is a formula for conditiona formatting:
    =SUMPRODUCT(--ISNUMBER(SEARCH($B$4:$B$7,B11)))>0
    B4:B7 contains the list of words, and B11 is where the list of strings starts
    Click the * to say thanks.

  3. #3
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Excel formula to find text from column B in column A

    You can use conditional formatting. Highlight the values in Column A and add new conditional formatting based on this formula:

    Please Login or Register  to view this content.
    Change the $B$10000 to be the last row of data in column B. Choose the highlight option you want. Similarly, highlight the cells in column B and create new conditional formatting using this formula:

    Please Login or Register  to view this content.
    Again, adjust $A$10000 to be the last row of data.

    Does this work for you?

    WBD
    Office 365 on Windows 11, looking for rep!

  4. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Excel formula to find text from column B in column A

    I've attached a sample showing how you would do this for your limited data set of 4 entries.

    WBD
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-28-2019
    Location
    Bucharest
    MS-Off Ver
    2016
    Posts
    2

    Re: Excel formula to find text from column B in column A

    Hello,

    I didn't specify that the value in column A will not be found in the same row on column B. It will always be on a different row. Also, not all rows will be highlighted in the end.
    The data I need to remain with (what I'm doing is highlighting - checking - then deleting) is all rows that have values in column A that were not found in column B and all rows that have values in column B that were not found in column A.

    Thank you!

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Excel formula to find text from column B in column A

    You can use this formula for your first column (i.e. highlight the cells in column A, then click on Conditional Formatting | New Rule | Use a formula... , and enter this one):

    =COUNTIF($B:$B,"*"&$A1&"*")

    and this one for your second, with column B cells selected:

    =SUMPRODUCT(--ISNUMBER(SEARCH($A$1:$A$4,$B1)))

    Hope this helps.

    Pete

+ 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] Find certain Text in a column then move those cells back 1 column
    By Grahamfeeley in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-11-2017, 02:15 AM
  2. [SOLVED] VBA Macro to find text string in one column and replace specific text in another column if
    By bmahfood in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-21-2017, 11:15 AM
  3. VBA Code to Find Specified text within a Column and perform Text to Column
    By MHamid in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-26-2014, 06:42 AM
  4. Find the same number in the column and then return text from another column"
    By SHOOTERTPP in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-02-2014, 11:21 PM
  5. Replies: 1
    Last Post: 09-01-2011, 12:05 AM
  6. Replies: 2
    Last Post: 02-27-2011, 11:59 AM
  7. [SOLVED] find every different text or data in a column - for Excel
    By Space Elf in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-23-2005, 10:00 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