abdelfattah
Well-known Member
- Joined
- May 3, 2019
- Messages
- 1,429
- Office Version
- 2019
- 2010
- Platform
- Windows
hi
i need copy data from A1:D TO F1 :I with the same width and height column and row in the same sheet this is my code but it doesn't work well
i need copy data from A1:D TO F1 :I with the same width and height column and row in the same sheet this is my code but it doesn't work well
VBA Code:
Sub rr()
Sheets("sheet1").Range("A1:d1000").Copy Destination:=Sheets("sheet1").Range("f1")
Selection.PasteSpecial Paste:=xlPasteColumnWidths
Selection.PasteSpecial Paste:=xlPasteRowHeights
Selection.PasteSpecial Paste:=xlPasteValuesandFormats, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub