Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
Greetings,
I'm trying to merge data in four columns ("F:I"). This will begin at Row 2 and go down to the last row in column F that has data. I got a basic VBA where I can get one row to merge. I just need it to include all rows that has data in Column F beginning on Row 2. Finally I need to Merge cells F across to I. Here is the formula that I managed to get one row to cooperate.
Below is an example of a row columns ("F:I"). The end result would be EB175010500002AXXX. Once they are combine I simply need to merge the cells across but begin on Row 1.
Thank you,
I'm trying to merge data in four columns ("F:I"). This will begin at Row 2 and go down to the last row in column F that has data. I got a basic VBA where I can get one row to merge. I just need it to include all rows that has data in Column F beginning on Row 2. Finally I need to Merge cells F across to I. Here is the formula that I managed to get one row to cooperate.
VBA Code:
Sub Merge()
Dim lr As Long, i As Long
lr = Range("F" & Rows.Count).End(xlDown).Row
For i = 2 To lr
Range("F" & i) = Range("F" & i).Text & Range("G" & i).Text & Range("H" & i).Text & Range("I" & i).Text
End
Next i
End Sub
Below is an example of a row columns ("F:I"). The end result would be EB175010500002AXXX. Once they are combine I simply need to merge the cells across but begin on Row 1.
Thank you,