Results 1 to 10 of 33

Thread: Special concatenation

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    14
    I do not understand why you use 'Let'. The use of it has become redundant for more than 20 years.

    To 'walk' in your approach:

    Code:
    Sub M_snb()
       sn = Sheet1.Cells(1).CurrentRegion
       
       For j = 2 To UBound(sn)
         For jj = 1 To UBound(sn, 2)
           c00 = c00 & IIf(jj = 1, sn(j, jj) & ";", """" & IIf(jj = 4, Format(sn(j, jj), "0.00"), sn(j, jj)) & """;")
         Next
         c00 = c00 & vbLf
       Next
       
       MsgBox Replace(c00, ";" & vbLf, vbLf)
    End Sub
    or

    Code:
    Sub M_snb_002()
       sn = Sheet1.Cells(1).CurrentRegion
       
       For j = 2 To UBound(sn)
        c00 = c00 & """" & vbLf & Replace(Join(Application.Index(sn, j), """;"""), """", "", , 1)
       Next
       
       MsgBox Replace(Mid(c00, 3), """0""", """0,00""")
    End Sub
    Last edited by snb; 08-31-2015 at 08:02 PM.

Similar Threads

  1. Flexible Concatenation Function
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 23
    Last Post: 05-11-2019, 08:22 PM
  2. copy special cells with values and formats
    By rodich in forum Excel Help
    Replies: 1
    Last Post: 10-25-2013, 03:55 PM
  3. To Paste special by value
    By ravichandavar in forum Excel Help
    Replies: 7
    Last Post: 08-13-2013, 12:23 PM
  4. FORMATTED Flexible Concatenation Function
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 1
    Last Post: 10-14-2012, 03:48 PM
  5. Remove Special Characters :
    By Rajan_Verma in forum Rajan Verma's Corner
    Replies: 3
    Last Post: 03-06-2012, 09:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •