+ Reply to Thread
Results 1 to 4 of 4

Auto Format

  1. #1
    Registered User
    Join Date
    01-17-2007
    Posts
    2

    Auto Format

    All,

    I have a list of 8 and 11 character codes stored within an excel spreadsheet.

    For example

    DABADKKK
    CHASGB2LFED

    I would like format these items so that they have a space after 4 characters, 6 charatcers and 8 characters i.e

    DABA DK KK
    CHAS GB 2L FED

    Is there a way that excel can automatically do this?

    Thanks in advance.
    Dan.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    =if(len(e9)=8;LEFT(E9;4)&" "&MID(E9;5;2)&" "&RIGHT(E9;2);LEFT(E9;4)&" "&MID(E9;5;2)&mid(e9;7;2)&" "&" "&RIGHT(E9;3))

    You might need to replace ; with , depending on your XL version

  3. #3
    Registered User
    Join Date
    01-17-2007
    Posts
    2
    Arthur,

    Worked perfectly thanks for your help!

    Regards,
    Dan.

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Welcome. Thx for the feedback !

+ 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