+ Reply to Thread
Results 1 to 5 of 5

Adding a dash after every 4 characters.

  1. #1
    Registered User
    Join Date
    08-13-2015
    Location
    Milwuakee, WI
    MS-Off Ver
    windows 7
    Posts
    17

    Adding a dash after every 4 characters.

    Good morning,

    im trying to add a dash after every 4 characters in each cell. For example

    waht it looks like now:

    Dd451234
    dd451234
    dd451234
    dd451234

    waht i need it to look like:

    Dd45-1234
    dd45-1234
    dd45-1234
    dd45-1234

    any help would be aprecieated

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Adding a dash after every 4 characters.

    =left(a1,4)&"-"&right(a1,4)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Adding a dash after every 4 characters.

    Try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    v A B
    1 Dd451234 Dd45-1234
    2 dd451234 dd45-1234
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Adding a dash after every 4 characters.

    Is that what all your data looks like - 8 characters long with the 4th character a 5??
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    08-13-2015
    Location
    Milwuakee, WI
    MS-Off Ver
    windows 7
    Posts
    17

    Re: Adding a dash after every 4 characters.

    Thanks Everyone these all work perfectly <3

+ 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. Get the characters before and after the "-" (dash)
    By smalltime in forum Excel General
    Replies: 5
    Last Post: 07-02-2015, 08:53 AM
  2. Replies: 1
    Last Post: 08-04-2011, 06:21 PM
  3. Adding characters
    By esupply in forum Excel General
    Replies: 2
    Last Post: 06-25-2010, 07:27 PM
  4. Excel 2007 Adding Number Separated by a Dash
    By tnoble17 in forum Excel General
    Replies: 1
    Last Post: 01-16-2010, 10:07 AM
  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
  6. [SOLVED] I need to add a dash five characters from the first in a cell
    By Angela in forum Excel General
    Replies: 4
    Last Post: 10-11-2005, 12:05 PM
  7. [SOLVED] Adding Characters
    By mcp6453 in forum Excel General
    Replies: 5
    Last Post: 09-02-2005, 05:05 AM
  8. [SOLVED] Adding characters
    By Amy Johnson in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-28-2005, 03:06 PM

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