+ Reply to Thread
Results 1 to 2 of 2

Concatenate strings from column with each strings from other column

Hybrid View

  1. #1
    Registered User
    Join Date
    02-13-2017
    Location
    Sofia
    MS-Off Ver
    2016
    Posts
    4

    Concatenate strings from column with each strings from other column

    Hello, I need to concatenate strings from column with each strings from other column
    What is the correct code for macros?


    A B
    st1 ar1
    st2 ar2
    st3 ar3

    result
    st1ar1
    st1ar2
    st1ar3
    st2ar1
    st2ar2
    st2ar3
    st3ar1
    st3ar2
    st3ar3

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Concatenate strings from column with each strings from other column

    
    Sub Macro1()
    LR = Cells(Rows.Count, 1).End(xlUp).Row
    
        Columns("A:A").Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
        Range("A1:A" & LR).FormulaR1C1 = "=RC[1]&RC[2]"
        Range("A1:A" & LR).Value = Range("A1:A" & LR).Value
        Columns("B:D").Delete
    End Sub
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

+ 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. Concatenate Strings to specified column until last row
    By mvneema in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 03-26-2014, 04:37 PM
  2. [SOLVED] Loop through strings stop when strings change and start looping in the next column...?
    By Prexcel in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-18-2013, 03:31 AM
  3. How to highlight cell on column A if they include any of the strings on column B?
    By sami770 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-22-2013, 09:30 AM
  4. Replies: 1
    Last Post: 12-20-2012, 04:18 PM
  5. Replies: 2
    Last Post: 06-16-2012, 06:20 PM
  6. Replies: 4
    Last Post: 04-09-2011, 02:51 PM
  7. column of strings, column of hyperlinks - how to combine?
    By jeff23 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-19-2010, 07:41 PM
  8. If Column A contains one of several strings then change column Bs string
    By Vestax159 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-05-2010, 07:31 PM

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