+ Reply to Thread
Results 1 to 12 of 12

Removing letters from cells (but leaving numbers and special characters)

  1. #1
    Registered User
    Join Date
    07-19-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    37

    Removing letters from cells (but leaving numbers and special characters)

    Hi All

    I'm looking for a formula which might help solve a problem I'm having with some data.

    In my spreadsheet I have a column of dates, however, within the same cell, some text can also appear.

    EXAMPLE: 01/01/2017 CGHS

    Is there a formula I can use to strip out the letters and leave behind just the numbers and the / character?

    Thanks in advance.

    EDIT:

    There can sometimes be two dates within the same cell and the letters are not always fixed in the same place.

    Attempted some VBA functions but one stripped out everything except numbers, which ruined the date format.
    Last edited by C_P; 12-01-2017 at 10:04 AM.

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,174

    Re: Removing letters from cells (but leaving numbers and special characters)

    Try this ...

    =MID(A2,SEARCH("??/??/????",A2),10)

  3. #3
    Valued Forum Contributor than_gold's Avatar
    Join Date
    10-17-2017
    Location
    Coimbatore India
    MS-Off Ver
    Office 365
    Posts
    646

    Re: Removing letters from cells (but leaving numbers and special characters)

    You can use below formula, if you have the last 4 letters are same in all col or rows.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards,
    Thangavel D

    Appreciate the help? CLICK *

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Removing letters from cells (but leaving numbers and special characters)

    Here's another option based on the single example that you have shared:

    =LEFT(A1,10)+0

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Removing letters from cells (but leaving numbers and special characters)

    Assuming date is in A1
    Formula in B1, Format as Date
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Or
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Registered User
    Join Date
    07-19-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    37

    Re: Removing letters from cells (but leaving numbers and special characters)

    Sorry, should also have mentioned:

    There can sometimes be two dates within the same cell and the letters are not always fixed in the same place.

    Attempted some VBA functions but one stripped out everything except numbers, which ruined the date format.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,691

    Re: Removing letters from cells (but leaving numbers and special characters)

    Attach a sample workbook (not image).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  8. #8
    Registered User
    Join Date
    12-01-2017
    Location
    Hertfordshire
    MS-Off Ver
    Win 7
    Posts
    2

    Re: Removing letters from cells (but leaving numbers and special characters)

    Hi, C_P is asking the query on my behalf Here is the data before and after (although I have another 500 rows to work through).

    Thank you,
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,174

    Re: Removing letters from cells (but leaving numbers and special characters)

    See this https://www.excelforum.com/excel-pro...ml#post4795061

    Use:

    =aa(A2,"\d{1,}/\d{2}/\d{4}",CHAR(10))
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    12-01-2017
    Location
    Hertfordshire
    MS-Off Ver
    Win 7
    Posts
    2

    Re: Removing letters from cells (but leaving numbers and special characters)

    This is great - have tested on main data-source and is working well.

    Thank you!

  11. #11
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Removing letters from cells (but leaving numbers and special characters)

    Try this formula enterd using Ctrl Shift Enter.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,301

    Re: Removing letters from cells (but leaving numbers and special characters)

    The TEXTJOIN function is only available to Office 365 subscribers.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ 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. Removing non numeric and special characters
    By katu in forum Excel General
    Replies: 6
    Last Post: 09-18-2015, 10:53 AM
  2. Removing special characters
    By sathishkm in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2014, 12:53 AM
  3. [SOLVED] VBA removing special characters
    By vnzerem in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-21-2014, 11:55 AM
  4. [SOLVED] Formula for removing special characters.
    By alexgempesaw in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-15-2013, 01:31 AM
  5. Replies: 4
    Last Post: 11-17-2012, 04:42 AM
  6. Removing Text and Leaving just numbers
    By FRIEL in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-16-2009, 08:12 AM
  7. Replies: 3
    Last Post: 11-28-2005, 02:00 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