+ Reply to Thread
Results 1 to 3 of 3

Detecting differences between strings of text

  1. #1
    Forum Contributor
    Join Date
    02-09-2011
    Location
    Perth, Australia
    MS-Off Ver
    2016
    Posts
    161

    Detecting differences between strings of text

    Hi,

    Please see attached example Excel file.

    I have a column of values “OLD_Successors”, and want to compare them to another column of values “NEW_Successors”, and detect where there is a difference (a value that is in one field but not the other, the order does not matter).

    For example, for a given Activity, one column might contain CN-113A1-MC-WP-020, CN-107B0-MC-WP-010 and the other might contain CN-110C6-MC-MT-250. I would need something to appear in my “Difference” column to indicate that the two do not contain the same values.

    I need a function or formula that shows me where the two fields do not contain exactly the same values (the order of the values doesn’t matter, for my purposes “CN-113A1-MC-WP-020, CN-107B0-MC-WP-010” is exactly the same as “CN-107B0-MC-WP-010, CN-113A1-MC-WP-020”).

    Basically, if there is a value in NEW_Successors that is not in OLD_Successors, or a value in OLD_Successors that is not in NEW_Successors I need a flag to alert me that I need to update my master data.

    There may be up to 30 (or more) values in a cell, and they are separated by commas. Either, or both, columns may also be empty, with no values.

    Thanks very much

    Dave
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,175

    Re: Detecting differences between strings of text

    Try ..

    =IF(ISNUMBER(SEARCH("*" & C5 & "*",B5,1)),"","mismatch")

    Your sample (if understand your requirement) is limited in identifying likely case. It would help if you expand the sample showing expected results in the "Difference" column.

  3. #3
    Forum Contributor
    Join Date
    02-09-2011
    Location
    Perth, Australia
    MS-Off Ver
    2016
    Posts
    161

    Re: Detecting differences between strings of text

    Thanks very much John.

    Dave

+ 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. Compare character strings in 2 cells and return only the differences
    By Barcenal28 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-09-2015, 05:12 PM
  2. Replies: 1
    Last Post: 03-06-2015, 01:07 PM
  3. Compare two strings and output the differences
    By aliastx in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-14-2013, 10:49 PM
  4. Compare Differences between 2 strings
    By wadafruck in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-11-2012, 07:09 PM
  5. Can You Output Differences Among Strings?
    By ilikeexcel in forum Excel General
    Replies: 3
    Last Post: 11-18-2011, 06:04 PM
  6. Finding differences in strings
    By tchezick in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-22-2005, 11:55 AM
  7. Replies: 0
    Last Post: 02-15-2005, 05:50 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