I have some data and range to work with. I want to have all the data that is populated per row concatenated into one cell for all E:P into Cell D. For example =CONCATENATE(E2,", ",F2) etc for N values in that range of E:P. Also I would like this to populate down each column for as long as there are values N columns down. I have a VBA script that will work for The first value in column E but i cannot understand how to finagle it to be dynamic to the values in the range E2:P#, where # is the Nth row with data in it. Help me make this script work Across the columns and down the rows.
Sub Concatenate1()
Dim ws As Worksheet: Set ws = Sheets("Sheet1")
With ws.Range("E2:E" & ws.Cells(ws.Rows.Count, "E").End(xlUp).Row)
.EntireRow.Columns("D").Formula = "=" & .Cells(1).Address(0, 0)
' or
'.Offset(, 1).Formula = "=""<>""&" & .Cells(1).Address(0, 0)
End With
End Sub
Actual Result in D4 is '=E4' or 8787-0004.
desired Result in D4 is: 8787-0004, 8787-0005, 8787-0006, 8787-0015. Do this for each value in RANGE E4:P4
Sub Concatenate1()
Dim ws As Worksheet: Set ws = Sheets("Sheet1")
With ws.Range("E2:E" & ws.Cells(ws.Rows.Count, "E").End(xlUp).Row)
.EntireRow.Columns("D").Formula = "=" & .Cells(1).Address(0, 0)
' or
'.Offset(, 1).Formula = "=""<>""&" & .Cells(1).Address(0, 0)
End With
End Sub
Actual Result in D4 is '=E4' or 8787-0004.
desired Result in D4 is: 8787-0004, 8787-0005, 8787-0006, 8787-0015. Do this for each value in RANGE E4:P4