+ Reply to Thread
Results 1 to 5 of 5

Insert Dash Into ISSN With Leading Zeroes and Text Characters

  1. #1
    Registered User
    Join Date
    06-16-2017
    Location
    NY
    MS-Off Ver
    2013
    Posts
    2

    Post Insert Dash Into ISSN With Leading Zeroes and Text Characters

    Hello!

    I have a list of tens of thousands of ISSNs and I need to insert a dash between the fourth and fifth characters in each cell. The catch is that some of the ISSNs have 1+ leading zeroes and/or end with a text character ("X"). I've tried several different formulas and a few custom formats to no avail.

    Could someone offer guidance on this, please?

    Here's an example list of values for the cells in question:

    00664146
    0927796X
    00319333
    14761122
    00079235


    And I need them to look like this:

    0066-4146
    0927-796X
    0031-9333
    1476-1122
    0007-9235
    Last edited by qwertyk; 06-16-2017 at 12:34 PM.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Insert Dash Into ISSN With Leading Zeroes and Text Characters

    Taking the first value as an example, does the cell actually contain "00664146" without using formatting...?

  3. #3
    Registered User
    Join Date
    06-16-2017
    Location
    NY
    MS-Off Ver
    2013
    Posts
    2

    Re: Insert Dash Into ISSN With Leading Zeroes and Text Characters

    Yes, the cells contain the leading zeroes without any formatting.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Insert Dash Into ISSN With Leading Zeroes and Text Characters

    Non-formula answer (2013 and higher versions)

    If the zeros are showing (as questioned by cytop) and your data is in column A
    Set column B formatted as text
    in B1 enter
    0066-4146
    then with B2 selected, go to DATA>Flash Fill.
    The rest should fill in automatically.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Insert Dash Into ISSN With Leading Zeroes and Text Characters

    As an alternative formula solution.


    A
    B
    C
    1
    00664146
    0066-4146
    In B2: =REPLACE(A1,5,0,"-")
    2
    0927796X
    0927-796X
    3
    00319333
    0031-9333
    4
    14761122
    1476-1122
    5
    00079235
    0007-9235


    But I have to agree with ChemistB. Flash fill is perfect for this.
    Dave

+ 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] Combine numeric text and retaining leading zeroes
    By tuneloon in forum Excel General
    Replies: 4
    Last Post: 12-02-2015, 05:09 PM
  2. Replies: 6
    Last Post: 10-09-2014, 03:05 AM
  3. Replies: 5
    Last Post: 10-10-2012, 06:04 AM
  4. Add zeroes within dates (NOT leading zeroes)
    By anthony19 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-13-2012, 04:08 PM
  5. Replies: 9
    Last Post: 11-25-2008, 08:51 PM
  6. Leading zeroes in a text field
    By MarlaJ in forum Excel General
    Replies: 8
    Last Post: 02-12-2007, 06:33 PM
  7. Leading zeroes get dropped when converted to text
    By Jason Grunert in forum Excel General
    Replies: 8
    Last Post: 08-04-2006, 04:45 PM

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