VBA to use activesheet selection in Transpose

lross

New Member
Joined
Aug 7, 2019
Messages
9
Hi
I am using the built-in function Transpose to convert an array to a string and would like to use the current selection

ie change this
Code:
Comments = Join(Evaluate("TRANSPOSE('Base'!A1:A10  )"), vbNewLine)

to
Code:
Comments = Join(Evaluate("TRANSPOSE(Selection  )"), vbNewLine)
The latter gives a type mismatch

Cheers
 

mikerickson

MrExcel MVP
Joined
Jan 15, 2007
Messages
22,683
Try

Code:
Comments = Join(Application.Transpose(Selection.Columns(1)), vbNewLine)
 

Forum statistics

Threads
1,077,649
Messages
5,335,473
Members
399,017
Latest member
npatel917

Some videos you may like

This Week's Hot Topics

Top