I need to copy content from a range of cells in sheet1, say A1:A10, and paste all the data in a single cell in sheet2 in cell A1
This seems to be a simple use case but I couldn't find any solution so far. Below is what I tried
' Attempt 1
Sheets("shee1").Select
Range("A1:A10").Select
Selection.Copy
MsgBox Selection.Text ' Error: Type mismatch. If I add Selection.Text to watch I see an array kind of structure with each index having each cell data
Dim val = Selection.Text
Sheets("sheet2").Select
Range("A1") = val
' Attempt 2
Sheets("sheet1").Range("A1:A10").Copy(Sheets("sheet2").Range("A1") 'Doesn't copy in single cell A1, instead copies to multiple rows like in source