+ Reply to Thread
Results 1 to 4 of 4

Concatenate Not doing the Job

Hybrid View

  1. #1
    Registered User
    Join Date
    07-10-2007
    Posts
    13

    Concatenate Not doing the Job

    I could be using the wrong tool but I'm trying to change approx 30,000 number values as follows:

    100132402101W500 ....to....W5-021-01-100132402101W500

    Need to copy a W5 to the front followed by a dash (-),then the 8th to the 10th digit, followed by another dash (-) then the 11th and 12th digit, followed by another dash, followed by the entire original number.

    I've tried different concatenations but they don't give me exactly what I need. Would be grateful for any assistance.....

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Have your tried:

    ="W5-"&Mid(A1,8,3)&"-"&Mid(A1,11,2)&"-"&A1

    where A1 houses original string.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Concatenate Not doing the Job

    Maybe this?...

    =MID(A1,13,2)&TEXT(MID(A1,8,5),"-000-00-")&A1

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    07-10-2007
    Posts
    13
    They both work!!!!! Much Thanks!!!!

+ 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