+ Reply to Thread
Results 1 to 5 of 5

Remove numbers from text string in one cell

  1. #1
    Registered User
    Join Date
    10-23-2015
    Location
    Milton Keynes
    MS-Off Ver
    365
    Posts
    2

    Remove numbers from text string in one cell

    Dear Excellers,

    Please help! I have a requirement to remove an age from a field of data that contains a persons name and some other personal information. It is for a daily direct mail job we run and if I can remove this information it will save me a huge amount of time and headaches each day. The data looks like this:

    Mr Joe Bloggs 69 Diabetes|Cholesterol levels screening score: 1.1 screening cost: 11.57 Include medical conditions cover|
    Mrs Joanne Bloggs 62 Cholesterol levels|High blood pressure|Underactive thyroid|Lichen sclerosus|Vitiligo screening score: 2.05 screening cost: 99.5 Include medical conditions cover|
    Mr John Smith 78 Depression screening score: 2.81 screening cost: 0 Exclude medical conditions cover|


    Names have been changed to protect the innocent. I need to remove the age immediately after the name. All the info above is in column BC in my file, which is currently save as a CSV.

    Thank you in advance!

    Gregg

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Remove numbers from text string in one cell

    Hi, welcome to the forum

    With your data in A1, try this ib B1, copied down...
    =TRIM(SUBSTITUTE(A1,LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),ROW(1:10000)))),""))
    (Main part of the formula courtesy of:*Ron Coderre)

    Adjust teh references as needed
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Remove numbers from text string in one cell

    Mmm. Much neater than my effort...

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Registered User
    Join Date
    10-23-2015
    Location
    Milton Keynes
    MS-Off Ver
    365
    Posts
    2

    Re: Remove numbers from text string in one cell

    Mind = Blown!

    Thank you so much for quick and excellent reply, it works! However, I forgot to mention that in another file, exactly the same format, I need to strip all the info out apart from the age you have so kindly just helped me to remove. Is that a tweak to the above formula or another task entirely?

    Thanks again.

    Gregg

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,054

    Re: Remove numbers from text string in one cell

    ... and an adaption of Ford/Ron's formula above:
    =TRIM(LOOKUP(99^99,--("0"&MID(A3,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A3&"0123456789")),ROW(1:10000)))))

+ 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. [SOLVED] Remove duplicate characters from a text string in a cell
    By sam99 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 09-22-2020, 06:10 PM
  2. [SOLVED] Add/ Remove a specifc text string to a cell based on a checkbox
    By Grilleman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-18-2014, 03:24 PM
  3. Replies: 8
    Last Post: 12-04-2013, 12:49 PM
  4. [SOLVED] Formula to remove smaller text string in cell
    By LightingPop in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-13-2013, 12:13 AM
  5. [SOLVED] Remove numbers from alphanumeric string. No standard format to the string.
    By ricunger in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-20-2012, 01:43 PM
  6. Remove numbers from text string
    By mkvassh in forum Excel General
    Replies: 2
    Last Post: 09-23-2011, 07:37 AM
  7. remove text before and/or after a string in a cell
    By hmatharo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-21-2008, 09:57 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