I have zero knowledge about Macro. Is there a kind of code I can use to copy data from several cells including its header to one cell. It looks like this:
This is the source table:
And this should be the output:
I have zero knowledge about Macro. Is there a kind of code I can use to copy data from several cells including its header to one cell. It looks like this:
This is the source table:
And this should be the output:
Here's the VBA code:
Sub copy_range_to_cell()
Set rng = Range("A3:C4")
For Each Column In rng.Columns
For Each cell In Column.Cells
Range("E4").Value = Range("E4").Value & cell.Text & Chr(10)
Next cell
Range("E4").Value = Range("E4").Value & Chr(10)
Next Column
End Sub
Before:
After: