ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   copy Transpose range data (https://www.excelbanter.com/excel-programming/304409-copy-transpose-range-data.html)

Hau

copy Transpose range data
 
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



Bob Flanagan

copy Transpose range data
 
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

"Hau" wrote in message
...
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





Hau

copy Transpose range data
 
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


-----Original Message-----
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

"Hau" wrote in

message
...
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




.


Bernie Deitrick

copy Transpose range data
 
Hau,

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

HTH,
Bernie
MS Excel MVP

"Hau" wrote in message
...
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






All times are GMT +1. The time now is 10:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com