+ Reply to Thread
Results 1 to 3 of 3

string concatenation

  1. #1
    Registered User
    Join Date
    02-24-2007
    Posts
    2

    string concatenation

    In the sheet, i already had a few columns:

    string1string2 string3
    001 1 1.5
    001 2 6.4


    I'd like to add a new column and concatenate the strings in previous columns with additional characters:

    string1 string2 string3 string4
    001 1 1.5 c-001-b01_1_5x
    001 2 6.4 c-001-b02_6_4x
    002 3 7 c-002-b03_7x

    Is there a good way to do this? Thanks in advance.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Use the & symbol between strings to concatenate

    e.g. =A1&B1&C1 concatenates A1, B1 and C1 together

    to add extra text strings...

    =A1&"text1"&B1&"text2"&C1
    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 Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    ="c-"&TEXT(A1,"000")&"-b"&TEXT(B1,"00")&"_"&SUBSTITUTE(C1,".","_")&"x"

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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