Concatenate Question

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
This seems to work:

Code:
Sub Test()
    Dim Rng As Range
    Dim x As Long
    Dim y As Integer
    Dim Txt As String
'   *** Change column and starting row to suit ***
    Set Rng = Range("A3:A" & Range("A65536").End(xlUp).Row)
    x = 1
    y = 1
    Do
        Txt = Rng.Cells(x, 1)
        Do
            If IsEmpty(Rng.Cells(x, 1).Offset(y, 0)) Then
                Rng.Cells(x, 1).Offset(0, 1) = Txt
                x = x + y + 1
                y = 1
                Exit Do
            Else
                Txt = Txt & Rng.Cells(x, 1).Offset(y, 0)
                y = y + 1
            End If
        Loop
    Loop While x <= Rng.Rows.Count
End Sub

Hope you don't mind not having formulas.
 
Upvote 0
i believe you can just call a worksheet function in your VB code like this....

WorksheetFunction.Concatenate(A1,A2,A3)

HTH
 
Upvote 0
WillR,

I know but I was too lazy to go to the trouble of building the formula. I think the OP used CONCATENATE just to show the required results.
 
Upvote 0

Forum statistics

Threads
1,203,068
Messages
6,053,343
Members
444,654
Latest member
Rich Cohen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top