+ Reply to Thread
Results 1 to 10 of 10

subtract text from one column if it maches with text of another column

  1. #1
    Registered User
    Join Date
    01-16-2020
    Location
    India
    MS-Off Ver
    MS Office 2016
    Posts
    5

    subtract text from one column if it maches with text of another column

    I have 3 columns in excel.
    column 1 contains set of text values.
    column 2 contains sub set of values in column1.
    i want column 3 to be filled with remaining values.

    is it possible in excel, if yes please help.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2019 (Win 10 - Work) & 365 Subscription Insider (Win 10 - Home)
    Posts
    34,101

    Re: subtract text from one column if it maches with text of another column

    Explain why rows 2 and 4 should be different.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

  3. #3
    Registered User
    Join Date
    01-16-2020
    Location
    India
    MS-Off Ver
    MS Office 2016
    Posts
    5

    Re: subtract text from one column if it maches with text of another column

    My requirement is every row may contain some random strings.

    The need is column 1 contains set of strings , column 2 contains subset of strings in column 1. The strings which are in 2nd column, if it matches with strings of column 1 needs to be subtracted and 3rd column to be filled by remaining string.

    if it is possible in excel by using some loop/formula/vba, kindly reply.

    Thanks

  4. #4
    Registered User
    Join Date
    03-18-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2016
    Posts
    59

    Re: subtract text from one column if it maches with text of another column

    Hi

    one using primitive excel method with helper column

    2nd one using Power Query (cater up to three sub-string), probably more sustainable way ( however if it expanded to text analysis then
    the method in Power Query will be tedious
    Attached Files Attached Files
    Christopher Yap

  5. #5
    Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    103

    Re: subtract text from one column if it maches with text of another column

    Hi bik

    You could use a custom function to do this, for example..
    Please Login or Register  to view this content.
    see attached zip fie (containing example .xlsm file with this function and some examples)

    zeddy
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-16-2020
    Location
    India
    MS-Off Ver
    MS Office 2016
    Posts
    5

    Re: subtract text from one column if it maches with text of another column

    Thank you very much.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    Excel 2019 (Win 10 - Work) & 365 Subscription Insider (Win 10 - Home)
    Posts
    34,101

    Re: subtract text from one column if it maches with text of another column

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  8. #8
    Registered User
    Join Date
    01-16-2020
    Location
    India
    MS-Off Ver
    MS Office 2016
    Posts
    5

    Re: subtract text from one column if it maches with text of another column

    Thank you. Earlier i thought this will not be possible in excel, but your response made me believe that what ever question will be asked on Excel Forum will be solved in no time. Thanks a lot.

  9. #9
    Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    103

    Re: subtract text from one column if it maches with text of another column

    Yes, but which answer did you use as the "solution"

  10. #10
    Registered User
    Join Date
    01-16-2020
    Location
    India
    MS-Off Ver
    MS Office 2016
    Posts
    5
    Your answer

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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