copy Transpose range data

H

Hau

Hi,

What is the VBA code if I need to copy verticaly a
transpose range of data which sheet1"A1:c1" to
sheet2"A1:A3".

Regards
 
B

Bob Flanagan

Hau, use the macro recorder to get the code.

Bob Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 
H

Hau

Rob,

This the VBA code that I have created. It seems that it is
getting wrong during pasting into the new sheet.
Could you please have look?
Thanks
======================================
Sub verticalpaste()
'
' verticalpaste Macro
' Macro recorded 19-07-2004 by B&L
'

'
ActiveWindow.SmallScroll Down:=-15
Range("B18").Select
Sheets.Add
Sheets("Mark-up").Select
Range("B18:B32").Select
ActiveWindow.SmallScroll Down:=-15
Range("B18:B32,AJ18:AJ32").Select
Range("AJ18").Activate
ActiveWindow.SmallScroll Down:=-12
Range("C4").Select
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("Mark-up").Select
Range("AJ8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet4").Select
Range("B4:B18").Select
ActiveSheet.Paste
Range("B19").Select
Sheets("Sheet4").Select
Range("C19").Select
Sheets("Mark-up").Select
ActiveWindow.SmallScroll Down:=-15
Range("B18:B32,AK18:AK32").Select
Range("AK18").Activate
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet4").Select
Selection.PasteSpecial Paste:=xlValues,
Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveWindow.SmallScroll Down:=15
Range("B19").Select
Sheets("Mark-up").Select
Range("AK8").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet4").Select
Range("B19:B33").Select
ActiveSheet.Paste
Range("E41").Select
End Sub
 
B

Bernie Deitrick

Hau,

Sheets("Sheet1").Range("A1:C1").Copy
Sheets("Sheet2").Range("A1").PasteSpecial _
Paste:=xlPasteAll, Transpose:=True
Application.CutCopyMode = False

HTH,
Bernie
MS Excel MVP
 
Top