+ Reply to Thread
Results 1 to 9 of 9

Compare Text in 2 Cells and Extract Uncommon Text

  1. #1
    Registered User
    Join Date
    02-17-2020
    Location
    Detroit, MI
    MS-Off Ver
    2019
    Posts
    9

    Compare Text in 2 Cells and Extract Uncommon Text

    Thank you in advance for your time and effort.

    I figured this would be a common issue, and I would find the answer to this quickly. Nope. So, I have 2 cells, Cell A1 and Cell B1. In Cell A1 I have text that says "Cleveland Tower" (without " "). In Cell B2 I have text that says "Cleveland Tower Painted Red On Tuesday" (without " "). I would like to extract "Painted Red On Tuesday" into Cell C1. So essentially I want to minus A1 from B1 to = C1. I have 3700 rows and there is no set amount of characters I can count in, or commas or periods I can use to split the text in the cell. I just want to remove the text in A1 from B1.

    Additional: I should add, that the text in the cells in Column A is always the first text in the cell in Column B. So if there is a way to count the characters in A1 then that is exactly how many I need to remove from B1. Example:

    Cleveland Tower - Cleveland Tower Painted Red On Tuesday - Painted Red On Tuesday
    Detroit Bridge - Detroit Bridge Painted Black On Monday - Painted Black On Monday
    Flint Center - Flint Center Painted Green On Saturday - Painted Green On Saturday


    Thanks
    Last edited by Nonoffensive Name; 09-22-2020 at 08:18 PM.

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365
    Posts
    1,249

    Re: Compare Text in 2 Cells and Extract Uncommon Text

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

    Good luck!

  3. #3
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365
    Posts
    1,249

    Re: Compare Text in 2 Cells and Extract Uncommon Text

    If text to remove is always on left, only the latter part should do:
    =MID(B1,FIND(A1,B1)+LEN(A1),100)

  4. #4
    Registered User
    Join Date
    02-17-2020
    Location
    Detroit, MI
    MS-Off Ver
    2019
    Posts
    9

    Re: Compare Text in 2 Cells and Extract Uncommon Text

    Estevaoba,

    That formula is giving me the same information that is currently in A1, the same information I am trying to extract from B1.

  5. #5
    Registered User
    Join Date
    02-17-2020
    Location
    Detroit, MI
    MS-Off Ver
    2019
    Posts
    9

    Re: Compare Text in 2 Cells and Extract Uncommon Text

    Same.

    First 2 rows is the first equation, and the 3rd row is the second equation.

    Attachment 696439

  6. #6
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365
    Posts
    1,249

    Re: Compare Text in 2 Cells and Extract Uncommon Text

    Your attachment is not working.
    Maybe your data are not positioned as I thought.
    Please check what I did in attachment, marked in orange color.
    If does not help, please follow instructions on yellow banner above on uploading a file.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-17-2020
    Location
    Detroit, MI
    MS-Off Ver
    2019
    Posts
    9

    Re: Compare Text in 2 Cells and Extract Uncommon Text

    Yep, I made the mistake in applying the formula. It works great. Thank you.

  8. #8
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365
    Posts
    1,249

    Re: Compare Text in 2 Cells and Extract Uncommon Text

    You're welcome.
    Thanks for marking the thread SOLVED and for the rep point added.

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,459

    Re: Compare Text in 2 Cells and Extract Uncommon Text

    In general, lookup string can be anywhere in Text string:

    Cleveland Tower Painted Red On Tuesday

    Painted Red Cleveland Tower On Tuesday

    Painted Red On Tuesday - Cleveland Tower

    Try:

    =SUBSTITUTE(B1,A1,"")
    Quang PT

+ 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. to compare two tables that also have uncommon elements
    By Diogo2 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-25-2018, 07:09 PM
  2. Replies: 2
    Last Post: 01-30-2013, 12:59 PM
  3. Compare two text cells and extract common text words
    By ghost_chip in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-28-2012, 06:07 AM
  4. Trying to extract certain text to other cells
    By dotsofcolor in forum Excel General
    Replies: 4
    Last Post: 11-07-2011, 04:08 AM
  5. Compare text between cells
    By paokun in forum Excel General
    Replies: 13
    Last Post: 10-01-2009, 07:59 AM
  6. [SOLVED] how do i compare 2 cells and extract the text that is different?
    By ky1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2005, 11:05 AM
  7. How do you compare text in cells
    By Sam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-18-2005, 01:34 PM

Tags for this Thread

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