+ Reply to Thread
Results 1 to 12 of 12

Subtract certain text

  1. #1
    Registered User
    Join Date
    06-01-2015
    Location
    Aarhus, Denmark
    MS-Off Ver
    2007
    Posts
    6

    Subtract certain text

    Hi,

    I have a huge sheet with 2000+ rows.
    And I need to subtract the text in A1 from the text in B1.

    A1:
    AL-ARZ ICE CREAM FACTORY CO.

    B1:
    Al-Arz Ice Cream - BT-C / GMF / GIF 1200


    Outcome should be:
    BT-C / GMF / GIF 1200


    Please help,

    BR
    Peter

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Subtract certain text

    You get better help if you add an small excel file without condicential information.

    Please also add manualy the expected result in your file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    06-01-2015
    Location
    Aarhus, Denmark
    MS-Off Ver
    2007
    Posts
    6

    Re: Subtract certain text

    How do I add a file to my post??
    Or in this case after I added my post?

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Subtract certain text

    1. It would help to see the workbook.

    To Attach a File:

    1. Scroll down to the window below your post Additional Options
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

  5. #5
    Registered User
    Join Date
    06-01-2015
    Location
    Aarhus, Denmark
    MS-Off Ver
    2007
    Posts
    6

    Re: Subtract certain text

    Sheet with example of problem
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-01-2015
    Location
    Aarhus, Denmark
    MS-Off Ver
    2007
    Posts
    6

    Re: Subtract certain text

    Thank you

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Subtract certain text

    See the question in #2.

    Please also add manualy the expected result in your file.

  8. #8
    Registered User
    Join Date
    06-01-2015
    Location
    Aarhus, Denmark
    MS-Off Ver
    2007
    Posts
    6

    Re: Subtract certain text

    Sorry, thought I did that already.

    /Peter
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Subtract certain text

    Your data is not consistent.

    See the attached file to see the green cells (The best I came with).

  10. #10
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Subtract certain text

    =IF(LEFT(TRIM(MID(B2,LOOKUP(9^9,SEARCH(LEFT(A2&" ^",ROW($1:$256))&" ",B2),ROW($1:$256))+1,256)),1)="-",MID(TRIM(MID(B2,LOOKUP(9^9,SEARCH(LEFT(A2&" ^",ROW($1:$256))&" ",B2),ROW($1:$256))+1,256)),3,256),TRIM(MID(B2,LOOKUP(9^9,SEARCH(LEFT(A2&" ^",ROW($1:$256))&" ",B2),ROW($1:$256))+1,256)))
    Please Login or Register  to view this content.
    SEE THE ATTACHED FILE
    It is not working for all the cases
    Attached Files Attached Files
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  11. #11
    Registered User
    Join Date
    06-01-2015
    Location
    Aarhus, Denmark
    MS-Off Ver
    2007
    Posts
    6

    Re: Subtract certain text

    Thanks a lot.

    It seems to be working, just have to clean up my data a bit for it to work on all cells.

    Again, thanks.

  12. #12
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Subtract certain text

    @Rennurg

    Since you get anwers of several forummembers it is Always good to add to who you are replying.

    Which solution did you choose?

+ 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. Text to date then subtract...
    By ryan in forum Excel General
    Replies: 5
    Last Post: 12-07-2005, 02:15 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