+ Reply to Thread
Results 1 to 4 of 4

Question on spacing out characters

Hybrid View

  1. #1
    Registered User
    Join Date
    09-09-2011
    Location
    Nowhere, Pennsylvania
    MS-Off Ver
    Excel 2003
    Posts
    2

    Question on spacing out characters

    I have a large amount of zip codes to space out for a personal project I am attempting to do. I have all the zip codes, but I need them spaced out in another cell.

    For example: I want 45365 to become 4 5 3 6 5 in another cell

    How would I go about adding a space between all characters in a single cell?
    Last edited by Alabaster_W; 09-12-2011 at 08:20 AM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Question on spacing out characters

    Welcome to the forum.

    =TEXT(A1, "0 0 0 0 0")
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    09-09-2011
    Location
    Nowhere, Pennsylvania
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Question on spacing out characters

    Quote Originally Posted by shg View Post
    Welcome to the forum.

    =TEXT(A1, "0 0 0 0 0")
    Thank you for having me. I appreciate your quick response.

    Is there an alternate formula that I can use?

    A large portion of the data I found is presented with commas and the ending of some of the zip codes (ex. as 48077,78,87) and some of the data is presented as a series (ex. as 48008-12). The majority, however, is presented as a single zip code and converts perfectly.

    Is there a formula to space out everything in a given cell rather than space out just five characters?

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Question on spacing out characters

    If you get rid of the miscellany so that the cell values are numbers, you could use

    =TEXT(A1, REPT("0 ", LEN(A1)))

    If the cell values are text (as some of yours are), it would take either a very messy formula or a simple UDF (VBA).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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