+ Reply to Thread
Results 1 to 4 of 4

Remove first character in a cell when the second character is blank

  1. #1
    Registered User
    Join Date
    07-31-2013
    Location
    dallas
    MS-Off Ver
    Excel 2007
    Posts
    2

    Remove first character in a cell when the second character is blank

    I have a list of 250,000 addresses. The street name field sometimes includes a direction letter as the first character such as N,S,E,W. I want to remove these single characters and then move the rest of the address to the left. Moving the text is easy. I can't understand how to remove the first letter when followed by a blank.
    Example:
    S CAPISTRANO DR
    KINGSRIDGE DR
    S CAPISTRANO DR
    BREMERTON CT

    In this example, I want to remove the "S".

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Remove first character in a cell when the second character is blank

    In an adjacent column, say B2:

    =IF(MID(A2, 2, 1)=" ", MID(A2, 3, LEN(A2)), A2)

    Copy that down. Then copy the results, click on the original cells and do a PASTE SPECIAL > VALUES.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Remove first character in a cell when the second character is blank

    Perhaps a formula like this?

    Please Login or Register  to view this content.
    if name starts in A1. Drag formula down as far as you need.

    Arggh! I should have checked before I posted!!

    Alf

  4. #4
    Registered User
    Join Date
    07-31-2013
    Location
    dallas
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Remove first character in a cell when the second character is blank

    Works Great! Many thanks.

+ 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: 3
    Last Post: 11-20-2012, 10:03 PM
  2. Replies: 3
    Last Post: 11-08-2012, 05:01 PM
  3. Macro to find character and delete all text in cell after the character
    By SpencerRichman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-01-2012, 06:08 PM
  4. Display Active Character Count + Limit Character Per Cell
    By euronail in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2011, 04:59 AM
  5. Remove a single character from a cell
    By netman in forum Excel General
    Replies: 2
    Last Post: 01-21-2008, 01:18 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