vba - concatenate multiple rows & columns into one cell

noidea23

New Member
Joined
Feb 16, 2022
Messages
28
Office Version
  1. 2021
Platform
  1. Windows
hello! would like to ask how to go about concatenating Range("A1:D3") into one cell as seen on "G1"
1645597211040.png


Thankyou!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Yeps, i need to do this using vba
Hmm, your post #3 response seemed to indicate formula would have been fine it it got all values in the one cell. :confused:

VBA Code:
Sub JoinThem()
  With Range("G1")
    .Value = Evaluate("TEXTJOIN(CHAR(10),,D1:D3&A1:A3&"" created in ""&B1:B3&C1:C3)")
    .WrapText = True
  End With
End Sub
 
Upvote 0
Solution
Hmm, your post #3 response seemed to indicate formula would have been fine it it got all values in the one cell. :confused:

VBA Code:
Sub JoinThem()
  With Range("G1")
    .Value = Evaluate("TEXTJOIN(CHAR(10),,D1:D3&A1:A3&"" created in ""&B1:B3&C1:C3)")
    .WrapText = True
  End With
End Sub
Ohh because i managed to do what the formula in post #2 did but using macro; just that couldn't combine into a single cell in separate lines.
Anyways, thank you! ^ helps a lot :)
 
Upvote 0

Forum statistics

Threads
1,226,695
Messages
6,192,478
Members
453,727
Latest member
tuong_ng89

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top