I am needing help with creating a VBA code to Concat a spreadsheet. Below is what I am using, but I am trying to do this for the entire sheet, and have it automatically change d3 to d6, d9, d12... etc. Every 3 rows. This is for completing a mailing address that our billing system spits out in different places when printing to excel. The document could be 100 rows in length, or it could be 5000 rows, this is why i have the loop until a blank found in column C. Any help is appreciated.
The first cells in the sheet would be (C4," ",D4," ",C5," ",F5," ",G5) that the data is pulled from, then cut or copied in cell D3. I want it to replicate this for the rest of the sheet, but move down 3 rows every time until a blank is found in column C.
Range("D3").Select
ActiveCell.FormulaR1C1 = _
"=CONCAT(R[1]C[-1],"" "",R[1]C,"" "",R[2]C[-1],"" "",R[2]C[2],"" "",R[2]C[3])"
Dim BlankFound As Boolean
Dim x As Long
Do While BlankFound = False
x = x + 1
If Cells(x, "C").Value = "" Then
BlankFound = True
End If
Loop
The first cells in the sheet would be (C4," ",D4," ",C5," ",F5," ",G5) that the data is pulled from, then cut or copied in cell D3. I want it to replicate this for the rest of the sheet, but move down 3 rows every time until a blank is found in column C.
Range("D3").Select
ActiveCell.FormulaR1C1 = _
"=CONCAT(R[1]C[-1],"" "",R[1]C,"" "",R[2]C[-1],"" "",R[2]C[2],"" "",R[2]C[3])"
Dim BlankFound As Boolean
Dim x As Long
Do While BlankFound = False
x = x + 1
If Cells(x, "C").Value = "" Then
BlankFound = True
End If
Loop