Hello
In probaMakro1 you have not marged cells so you can simpy copy and PastSpecial with transpose data, but in your main workbook "TEST.xls" you had few marged cells (i.e. F10:I10, E13:I13, E28:I28) so copy and pasteSpecial with transpose will return error because source date have other structure then destination range.
I update your file TEST.xls with my idea - I hope You will enjoy it.
'this have to be before any procedure - so mainly above the whole code
Option Base 1
'and here is procedure for copy data
Private Sub CommandButton3_Click()
Set sSH = Sheets("Sheet1") 'set source sheet
Set oSH = Sheets("Sheet2") 'set output sheet
CellsToCopy = Array("g7", "h4", "i4", "j4", "f10", "e13", "e28", "f36", "h36", "g44", "e47")
firstRow = oSH.Cells.Find("*", searchdirection:=xlPrevious).Row + 1
'copy all necessary data
For i = 1 To UBound(CellsToCopy)
oSH.Cells(firstRow, i).Value = sSH.Range(CellsToCopy(i)).Value
Next i
MsgBox "data was successfully copied"
End Sub
in attached file I update working example - I hope it is what you need
Bookmarks