VBA Macro code for =Concat(Transpose) formula

Browneh89

Board Regular
Joined
Mar 8, 2019
Messages
55
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am having trouble recording a macro that separates a list of value in one cell separated by a comma.

the formula I use is =CONCAT(TRANSPOSE(ARRAY)&",") I use Shift and down arrow to select the array and F9 to convert that into separate values however the macro recorder seems not to understand these actions.

Can anyone please help me with this, would be much appreciated?
 
This will put the string into C4
VBA Code:
Sub Browneh()
   With Range("A2", Range("A" & Rows.count).End(xlUp))
      .Range("C4").Value = Join(Application.Transpose(.Value), ",")
   End With
End Sub
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Just realised you profile is showing that you are using 2013, is that correct?
Just that 2013 doesn't have the Concat function.
Hey Fluffy, Hope you had a good new years!

No it is 365 now, we updated from 2013 last summer I forgot to update that. Sorry!
 
Upvote 0
Very quite New Year with the lockdown & pubs being closed unfortunately.

As you have 365, how about
Excel Formula:
=TEXTJOIN(",",1,A2:A100)
 
Upvote 0
Solution
Very quite New Year with the lockdown & pubs being closed unfortunately.

As you have 365, how about
Excel Formula:
=TEXTJOIN(",",1,A2:A100)
Yup I know that feeling.

Ah that's a far easier formula to use! thank you very much.
 
Upvote 0

Forum statistics

Threads
1,214,886
Messages
6,122,093
Members
449,064
Latest member
Danger_SF

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