+ Reply to Thread
Results 1 to 8 of 8

Insert a hyphen after 6 digits

  1. #1
    Registered User
    Join Date
    06-20-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    24

    Insert a hyphen after 6 digits

    I have hundreds of rows of data all starting with 6 digits, then text. I want to insert " - " a space then a hyphen and another space prior to the text. Attached is an example. Column A is that data currently and c is what I want it to read.

    Can you assist with a formula?

    Thanks,
    Attached Files Attached Files

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Insert a hyphen after 6 digits

    Try this....
    In C1
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Insert a hyphen after 6 digits

    insert this in column c for every entry
    Please Login or Register  to view this content.

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,911

    Re: Insert a hyphen after 6 digits

    Try this ...

    =REPLACE(A1,7,0," -")

  5. #5
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: Insert a hyphen after 6 digits

    It is always after 6 digit or characters, to insert "-" after it?

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,888

    Re: Insert a hyphen after 6 digits

    In C1 =LEFT(A1,6) &" - " & MID(A1,7,LEN(A1)-6) and copy down.
    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

  7. #7
    Registered User
    Join Date
    06-20-2013
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Insert a hyphen after 6 digits

    Thank you. worked perfectly

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Insert a hyphen after 6 digits

    You're welcome. Glad we could help.
    Thanks for the rep.

+ 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 or Macro for adding hyphen after 5 digits
    By TitansGo in forum Excel General
    Replies: 3
    Last Post: 11-23-2015, 02:27 PM
  2. [SOLVED] Insert Hyphen
    By mgs in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-12-2013, 02:08 AM
  3. [SOLVED] Adding a hyphen and keeping all digits
    By norm01 in forum Excel General
    Replies: 2
    Last Post: 05-01-2012, 05:40 PM
  4. insert a hyphen between alpha and numeric in the same cell
    By jspeterson in forum Excel General
    Replies: 4
    Last Post: 02-09-2012, 09:52 PM
  5. Is it possible to insert a hyphen in text by formula?
    By Chineseand in forum Excel General
    Replies: 2
    Last Post: 01-12-2012, 10:08 AM
  6. Is it possible to insert a hyphen in text by formula?
    By Brahma72472 in forum Excel General
    Replies: 5
    Last Post: 01-11-2012, 09:55 AM
  7. Insert Hyphen (-) between two words
    By rvc81 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2010, 05:15 AM

Tags for this Thread

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