+ Reply to Thread
Results 1 to 9 of 9

delete/extract various text strings from cells

  1. #1
    Registered User
    Join Date
    01-23-2011
    Location
    west coast, south africa
    MS-Off Ver
    MSO 365
    Posts
    25

    delete/extract various text strings from cells

    hi!

    i am cleaning up years of contacts from my google account... [i wish there was a manual somewhere with step by step guidance and some vba to assist in this]
    this might be the 1st of a couple of requests for help.

    the problem:
    there are cells with text strings like "watsonphone" or "smithfamily" or "039155672given" - i want to clean the data by deleting, in this case, the "phone", "family" or "given" - there are other strings.


    i am not a programmer and only venture into excel infrequently, so please spare me the flames

    let me know if this requires 'commercial services'

    it's been a couple of days but have a wonderful rest of 2021!

    God bless
    gabriel
    "I am the way, the truth, and the life...."

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: delete/extract various text strings from cells

    Assuming;
    Data is in Col.A and output in Col.B
    Such word is always at the end.
    Please Login or Register  to view this content.
    Last edited by jindon; 01-04-2021 at 11:10 PM. Reason: typo

  3. #3
    Registered User
    Join Date
    01-23-2011
    Location
    west coast, south africa
    MS-Off Ver
    MSO 365
    Posts
    25

    Re: delete/extract various text strings from cells

    tx jindon, i believe my request was to vague... let me try again.
    1st off your code did exactly what it said, but your solution and my problem don't see eye to eye.
    my text strings occur randomly over many columns/rows and are not always the same length and could be in front. middle or back of the text i would like to keep.
    also the text i want to keep must stay in the same cell, thus if c24 is say "myunclebob" and i want to get rid of "myuncle" i should somewhere in the code be able to enter "myuncle" [or whatever], run the code and be left with bob in cell c24 - "myuncle" must be gone
    in other words i will have to be able to adjust whatever i want to be deleted within the code, preferably more than one text string at a time in order to save time, for instance i will have to instruct the vba to delete "family", "given", "phone", "whatever" etc on the sheet in all of the cells.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: delete/extract various text strings from cells

    I don't know if it is possible or not, but post a workbook with before/after sheet, so that we can see your problem.

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,230

    Re: delete/extract various text strings from cells

    Can't you just have a separate sheet with all the strings to be deleted... then code can delete all at once...
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  6. #6
    Registered User
    Join Date
    01-23-2011
    Location
    west coast, south africa
    MS-Off Ver
    MSO 365
    Posts
    25

    Re: delete/extract various text strings from cells

    hi folks, thanks for joining from the mothercity sintek, the solution just popped into my brain... no xtra code needed, just untick "match entire cell contents" see image. and voila!... or in southafrican 'lekker my bra' , so prob SOLVED! enjoy your day!
    Attachment 711654
    God bless
    gabriel

  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,780

    Re: delete/extract various text strings from cells

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    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.

  8. #8
    Registered User
    Join Date
    01-23-2011
    Location
    west coast, south africa
    MS-Off Ver
    MSO 365
    Posts
    25

    Re: delete/extract various text strings from cells

    Quote Originally Posted by AliGW View Post
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    just did tx aligw!

  9. #9
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: delete/extract various text strings from cells

    And maybe
    Just in case
    Please Login or Register  to view this content.

+ 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. Replies: 9
    Last Post: 08-20-2020, 05:30 AM
  2. extract text from variable length strings in text file
    By Wiigit in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2019, 01:33 PM
  3. Need to extract years (and other info) from strings of text in a column of cells
    By Gene@action in forum Excel Programming / VBA / Macros
    Replies: 48
    Last Post: 10-13-2016, 09:07 PM
  4. [SOLVED] Search for red filles cells or certain text strings cells in Column A and delete row.
    By The Skipper in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2013, 12:57 PM
  5. Extract common text strings between two cells A1 B1
    By ghost_chip in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-25-2013, 01:39 AM
  6. Extract text strings
    By wazing in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-22-2010, 01:25 PM
  7. extract text strings
    By jhelliar in forum Excel General
    Replies: 5
    Last Post: 09-16-2008, 12:19 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