I have an excel table that has 3 columns I am selecting those 3 columns with a certain number of rows, I want to copy those values into a string that is separated by comma & the values are encapsulated by single quotes. But I see the transpose has a limitation of only one column. Here's what I am trying so far.
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Dim str as string
str = Join(Application.Transpose(Selection.Value),"','")
msgbox(str)
But as I said transpose works on only one column. Any ideas would help.
Table
A B C
1 99999 88888 77777
2 55555 66666 44444
3 22222 11111 33333
Expected output
'99999','88888','77777','55555'.....'33333'
Order of items can be anything I just want to convert the values into the specified output.