+ Reply to Thread
Results 1 to 4 of 4

Enter - - in a value

  1. #1
    Registered User
    Join Date
    10-16-2009
    Location
    George South Africa
    MS-Off Ver
    Excel 2010
    Posts
    14

    Enter - - in a value

    I need to change a certain stock number (AJ1101100102) so it looks like this (AJ11-0110-0102).
    Is there an easy way to add the two - - between the numbers.
    I use excel 2010

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Enter - - in a value

    Maybe

    =LEFT(A1,4)&"-"&MID(A1,5,4)&"-"&RIGHT(A1,4)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    10-16-2009
    Location
    George South Africa
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Enter - - in a value

    Thank you very much Fotis1991 it work.

  4. #4
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: Enter - - in a value

    assume that in "A1" = (AJ1101100102) THEN put the following formula in
    "B1" =LEFT(A1,9)
    "C1" = LEFT(A1,5)&"-"&RIGHT(B1,4)&"-"&RIGHT(A1,5)

    THEN YOU WILL GET YOUR SOLUTION IN "C1"


    HOPE IT IS WORKING FOR YOU
    IF IS THERE ANY PROBLEM THEN TELL ME

    Regards
    CA Mahaveer Somani

+ 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