+ Reply to Thread
Results 1 to 5 of 5

compare and extract specific string from cells to new column

Hybrid View

  1. #1
    Registered User
    Join Date
    04-27-2010
    Location
    Amstel
    MS-Off Ver
    Excel 2021
    Posts
    20

    compare and extract specific string from cells to new column

    Hithere,

    I have a sheet with a list of data in column A, and a list of data in column B.
    I want to accentuate (or extract) the differences between those two rows and put those in a new column.
    (and possibly have a new column with A and B added together without duplicates)

    The complicating factor (which makes it impossible for me to know where to start solving this problem), is that only a specified string in these cells is to be checked for differences/similarities.

    To be more specific:
    I want to have cell content [ <color="black" "123" ] being considered to be a match with [ <color="black" "abc" ]
    So only the specific string between [ < ] and the second [ " ] is to be checked for difference/similarity.

    So something like this:

    input input result result result
    A B missing from A missing from B A + B
    <color="black" "123" <color="black" "abc" <color="blue" "bcd" <color="green" "234" <color="black" "123"
    <color="green" "234" <color="blue" "bcd" <color="yellow" "def" <color="red" "345" <color="blue" "bcd"
    <color="red" "345" <color="white" "cde" <color="green" "234"
    <color="white" "456" <color="yellow" "def" <color="red" "345"
    <color="white" "456"
    <color="yellow" "def"


    I attached an excel sheet to hopefully make it easier to understand (and test) what I would like to achieve.

    TIA!
    extract column differences.xlsx
    Last edited by jistme; 09-14-2013 at 09:17 AM.

  2. #2
    Registered User
    Join Date
    03-19-2013
    Location
    Cambridge, England
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: compare and extract specific string from cells to new column

    I think this basically does what you want, although the ordering may be wrong. Unfortunately I don't know how to get rid of the spaces.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-27-2010
    Location
    Amstel
    MS-Off Ver
    Excel 2021
    Posts
    20

    Re: compare and extract specific string from cells to new column

    Quote Originally Posted by Alex H View Post
    I think this basically does what you want, although the ordering may be wrong. Unfortunately I don't know how to get rid of the spaces.
    Wow, thnx, that's impressive Alex.
    My big challenge now will be to figure out what is happening in your formulas, and then try to translate it to the actual sheet I want to use it in.
    That'll be a couple of days I'm afraid, but this is a fantastic start...

    For now there is one strange hick-up I notice and already can't figure out:
    When I add e.g. [ <color="pink" "111" ] in both cells A8 and B8, output in C8 and D8 is wrong? (saying pink is missing from both)

    edit: got this last part.
    Last edited by jistme; 09-14-2013 at 07:36 PM.

  4. #4
    Registered User
    Join Date
    03-19-2013
    Location
    Cambridge, England
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: compare and extract specific string from cells to new column

    As always it's easiest to understand if you try to break it down so you only look at 1 function at a time.

    mid, len, offset, row, match & if are incredibly useful for this sort of thing. As are right and left.

    Have a look at the revised spreadsheet which explains it a bit better. Any questions, let me know.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-27-2010
    Location
    Amstel
    MS-Off Ver
    Excel 2021
    Posts
    20

    Re: compare and extract specific string from cells to new column

    Just to let you know, thanks to your work and support I got the sheet I needed this for working today already.
    So: case closed.

    thnx again Alex!

+ 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. I am trying to truncate cells in a column from a specific character in a string
    By goldbeje in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-27-2012, 09:20 PM
  2. [SOLVED] Macro:Extract value from specific cells in different worksheet named in column A
    By VBNewbie1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2012, 10:20 PM
  3. Replies: 1
    Last Post: 04-23-2012, 10:27 AM
  4. Replies: 1
    Last Post: 08-23-2007, 01:10 PM
  5. [SOLVED] extract specific info from cells in a column
    By Herman in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 10-26-2005, 10:05 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