This is very simple question.
I have names in the cells K10 to K12. I want to copy them to a string. Tried the following code, but the output is only cell k10 value.
I know this can be implemented using a for loop, but want to see the mistake in the above method.Sub fill() Dim x As Range, st As Variant Set x = ActiveSheet.Range("k10:k12") st = x.Value [c1] = st End Sub
Thanks
Try (untested)
Dim st as string st = Join(Application.Transpose(Application.Transpose(Range("k10:k12"))))
Regards, TMS
Getting Run time error 5
Invalid procedure call or argument
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks