+ 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
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    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!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  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
    Forum Contributor
    Join Date
    03-18-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2016 / 2019
    Posts
    251

    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
    Valued Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    467

    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
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    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
    Valued Forum Contributor
    Join Date
    08-03-2012
    Location
    Newcastle
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, Office 365
    Posts
    467

    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)

Similar Threads

  1. VBA: Look for partial text in Column A from Column B and paste text offset Column A
    By coryspeth in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-07-2018, 05:53 AM
  2. [SOLVED] Macro to Copy and Paste Specific Text in Column A on the last line with Text in Column B?
    By D2S in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2017, 04:08 PM
  3. [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
  4. Replies: 3
    Last Post: 04-21-2016, 02:52 AM
  5. Filter column by text, then export column to new workbook, replace searched text with new.
    By Headhunter234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-30-2015, 07:48 AM
  6. Subtract values based on text in another column?
    By TCK in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-10-2013, 06:35 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