+ Reply to Thread
Results 1 to 9 of 9

Automatic insert of forward slash (/)

  1. #1
    Registered User
    Join Date
    07-23-2010
    Location
    herts
    MS-Off Ver
    Excel 2003
    Posts
    12

    Automatic insert of forward slash (/)

    I am constantly typing numbers down columns and am forever having to insert a slash (/) between the numbers.

    Is there a way to auto insert a slash (/) where I need it.

    Eg: 520101473 needs to be 5/2010/1473

    I dont mind making another column which = the desired effect.

    Thanks in advance

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Automatic insert of forward slash (/)

    You can format the column as 0/0000/0000, but values entered that way will be numbers, not text.
    Last edited by shg; 09-08-2010 at 04:01 PM.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Automatic insert of forward slash (/)

    Hi
    does your number always have 9 digits and will the outcome always be as x/yyyy/zzzz ?

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Automatic insert of forward slash (/)

    Hi,

    Provided the slash always goes in the same place in a 9 digit number

    =LEFT(A1,1)&"/"&MID(A1,2,4)&"/"&RIGHT(A1,4)
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  5. #5
    Registered User
    Join Date
    07-23-2010
    Location
    herts
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Automatic insert of forward slash (/)

    well the number will always be x/yyyy/zzzz or xx/yyyy/zzzz

    xx and x being the current month so 1 - 12

    Thanks so far guys

  6. #6
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: Automatic insert of forward slash (/)

    How about this?

    =IF(LEN(A1)=9,LEFT(A1,1)&"/"&MID(A1,2,4)&"/"&RIGHT(A1,4),LEFT(A1,2)&"/"&MID(A1,3,4)&"/"&RIGHT(A1,4))

  7. #7
    Registered User
    Join Date
    07-23-2010
    Location
    herts
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Automatic insert of forward slash (/)

    That will do nicely !!!

    Thank you very much

  8. #8
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Automatic insert of forward slash (/)

    or without using IF check

    =LEFT(A1,LEN(A1)-10+2)&"/"&MID(A1,LEN(A1)-10+3,4)&"/"&RIGHT(A1,4)
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Automatic insert of forward slash (/)

    FWIW you can use shg's approach in a TEXT call

    =TEXT(A1,"#0\/0000\/0000")

+ 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