Em muốn Paste special / values / transpose 1 đoạn đang chọn sang vị trí khác bằng VBA có được không?. Cho xin code nhen?. Thân
:bigok:Option Explicit
Sub PasteTranspose()
Range("A3:B10").Copy
Sheets("Input").Select: Range("H2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, Transpose:=True
End Sub
Hi ! Mình muốn copy vùng đang chọn ( người dùng muốn copy dòng nào cột nào thì chọn vùng đó) chứ không phải định sẳn vùng copy như trong code của bạn (Range("A3:B10").Copy).Thân.
:byebye::lol:Option Explicit
Sub TranposeCopy()
Dim sRng As Range, DesRng As Range
Set sRng = Application.InputBox("HAY CHON VUNG CAN COPY", "TranposeCopy", Type:=8)
Set DesRng = Application.InputBox("HAY CHON VUNG CHUA DU LIEU:", "Destination", Type:=8)
If Not sRng Is Nothing And Not DesRng Is Nothing Then
sRng.Copy
DesRng.Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, Transpose:=True
Application.CutCopyMode = False
End If
End Sub