+ Reply to Thread
Results 1 to 3 of 3

Remove preceding spaces in column?

  1. #1
    Forum Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    Remove preceding spaces in column?

    So this question is a little more complex than just removing preceding spaces. I currently have some code setup to test if a cell is blank then to enter a phone number:

    Please Login or Register  to view this content.
    So if there is a cell in Column AC that is not blank, it will leave whatever is in that cell.

    The issue I'm running into is that some cells will have a random space at the beginning of the cell. The cell looks blank, but if you go into the cell, there is a blank space at the beginning, so then my code above leaves it as a blank cell.

    Is there a way to alter my code above to adjust for a situation with a cell with a preceding blank space?

    Thanks.

  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 preceding spaces in column?

    Try this:
    Please Login or Register  to view this content.
    _________________
    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 Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    Re: Remove preceding spaces in column?

    Quote Originally Posted by JBeaucaire View Post
    Try this:
    Please Login or Register  to view this content.
    Perfect! 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. [SOLVED] Formula to add extra spaces preceding characters in cell
    By NS4Excel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-21-2015, 04:48 PM
  2. [SOLVED] Preceding Spaces in Excel Formula Removed When Copied
    By JYTS in forum Excel General
    Replies: 16
    Last Post: 10-12-2015, 01:24 PM
  3. Replies: 3
    Last Post: 11-11-2014, 03:09 PM
  4. [SOLVED] Delete preceding spaces
    By kjxavier in forum Excel General
    Replies: 2
    Last Post: 09-23-2014, 12:03 AM
  5. [SOLVED] Formula to insert text in new column if preceding more than one of the preceding have val
    By aimeecrystalaid in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-04-2013, 11:47 PM
  6. Deleting spaces preceding text in copied in data
    By cloudwalking in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-04-2013, 09:08 AM

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