Hi,
I have the below code that works great, however i need to update the last column depending on the number of columns in the file.
I am not sure how I can make the last column dynamic in the below code.
I have the below code that works great, however i need to update the last column depending on the number of columns in the file.
I am not sure how I can make the last column dynamic in the below code.
VBA Code:
Dim i As Long
Dim Lastrow As Long
Lastrow = Range("B" & Rows.Count).End(xlUp).Row
For i = 2 To Lastrow
Range("A" & i).Formula = Range("B" & i) & ";" & Chr(34) & Replace(Join(Application.Index(Range("c" & i & ":CS" & i).Value, 1, 0), """;"""), """""", "")
Next i