It makes no sense to use VBA / UDF or CONCAT here. Use a simple formula like =A2&"|"&B2 and drag down.
Andreas.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I have two arrays or ranges. Need to join the ranges across rows with delimiter "|" and it has to stored as new array as per below image.
C
Required VBA code for desired output array and it to store with new name
Tried using concat function as provided below but it doesn't work.
Dim RowName1 As String
Dim RowName2 As String
RowName = Application.WorksheetFunction.Concat(Range(RowName1).Value, "|", Range(RowName2).Value)
Thanks in Advance
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
It makes no sense to use VBA / UDF or CONCAT here. Use a simple formula like =A2&"|"&B2 and drag down.
Andreas.
Thanks for reply,
I would require in VBA only. Because it is input to the other piece of code.
Well, it is not possible to give accurate information based on your screenshot.
On the other hand, if you loop through the rows (with your other code) the concatenate is simple like
Range("D" & ThisRow) = Range("A" & ThisRow) & "|" & Range("B" & ThisRow)
If you need further help please upload your file (maybe with anonymous data) on an online file hoster like https://www.dropbox.com and post the download link here.
Andreas.