Closed Thread
Results 1 to 4 of 4

Letter spaced with DASH

  1. #1
    Forum Contributor
    Join Date
    01-03-2013
    Location
    Toulouse
    MS-Off Ver
    Excel 2010
    Posts
    141

    Letter spaced with DASH

    Hey guys,
    my problem insist:

    I want input in cells A1:A10 letter and they must be spaced with dash

    ie. AAABBBCCCDDD after i press the enter key it should show AAA-BBB-CCC-DDD


    I have tried ###-###-###-### , it actually work with number only


    Please any help
    Thank you ,

    Antonio

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,739

    Re: Letter spaced with DASH

    You can't format Text using a format. You will need to put a formula in an adjacent column and do something like

    (assume your first value is in A1, Then in B1 for example

    =LEFT(A1,3)&"-"&MID(A1,4,3)&"-"&MID(A1,7,3)&"-"&RIGHT(A1,3)

    now drag fill it down the column. Then select column B and do Edit=>Copy, then immediately Edit=>Paste Special and select Values. This will replace the formula with the values that are displayed. Then you can delete column A.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Valued Forum Contributor
    Join Date
    10-29-2012
    Location
    Mojokerto,Indonesia
    MS-Off Ver
    Excel 2007
    Posts
    554

    Re: Letter spaced with DASH

    try this
    =REPLACE(REPLACE(REPLACE(A1,4,0,"-"),8,0,"-"),12,0,"-")

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,739

    Re: Letter spaced with DASH

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Line markers further spaced
    By SanFranciscoSarah in forum Excel General
    Replies: 4
    Last Post: 11-18-2011, 04:55 AM
  2. From col A (spaced) to col B (compacted)
    By maujor in forum Excel General
    Replies: 2
    Last Post: 06-07-2010, 07:28 PM
  3. Replies: 3
    Last Post: 09-24-2008, 11:12 AM
  4. [SOLVED] chart ledgend looks double spaced. How do I fix to single spaced?
    By villalp in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 04-25-2006, 02:20 PM
  5. understanding dash dash in a excel formula
    By ldebner in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-31-2005, 10:05 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