ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Transform entities from column of 1 sheet1 to row of another sheet (https://www.excelbanter.com/excel-programming/367407-transform-entities-column-1-sheet1-row-another-sheet.html)

Thulasiram

Transform entities from column of 1 sheet1 to row of another sheet
 
How to transfer the entities in the columns of one worksheet to rows of
another worksheet in an Excel book?. For example I would like to copy 50
entities in column A of worksheet 1 to row 1 of worksheet 2.

So, for the above question I would like to know the code that should be
written in the VB code editor (for the command button with caption "Shift
Entities").

Die_Another_Day

Transform entities from column of 1 sheet1 to row of another sheet
 
Private Sub ShiftEntities_Click()
Dim wb2 As Workbook
Set wb2 = Workbooks("YourBook2.xls")
Range("A1:A50").Copy
Windows("Book2").Activate
Range("A1").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
End Sub

HTH

Die_Another_Day
Thulasiram wrote:
How to transfer the entities in the columns of one worksheet to rows of
another worksheet in an Excel book?. For example I would like to copy 50
entities in column A of worksheet 1 to row 1 of worksheet 2.

So, for the above question I would like to know the code that should be
written in the VB code editor (for the command button with caption "Shift
Entities").



Thulasiram

Transform entities from column of 1 sheet1 to row of another s
 
Thanks a lot.

"Die_Another_Day" wrote:

Private Sub ShiftEntities_Click()
Dim wb2 As Workbook
Set wb2 = Workbooks("YourBook2.xls")
Range("A1:A50").Copy
Windows("Book2").Activate
Range("A1").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
End Sub

HTH

Die_Another_Day
Thulasiram wrote:
How to transfer the entities in the columns of one worksheet to rows of
another worksheet in an Excel book?. For example I would like to copy 50
entities in column A of worksheet 1 to row 1 of worksheet 2.

So, for the above question I would like to know the code that should be
written in the VB code editor (for the command button with caption "Shift
Entities").




Thulasiram

Transform entities from column of 1 sheet1 to row of another s
 
I get an error when I pasted the code in the VBA script. i changed
YourBook2.xls as Sample.xls as its the file name. Compiler shows error in
Windows("Book2").Activate

and

Range("A1").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True

Please help

"Die_Another_Day" wrote:

Private Sub ShiftEntities_Click()
Dim wb2 As Workbook
Set wb2 = Workbooks("YourBook2.xls")
Range("A1:A50").Copy
Windows("Book2").Activate
Range("A1").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
End Sub

HTH

Die_Another_Day
Thulasiram wrote:
How to transfer the entities in the columns of one worksheet to rows of
another worksheet in an Excel book?. For example I would like to copy 50
entities in column A of worksheet 1 to row 1 of worksheet 2.

So, for the above question I would like to know the code that should be
written in the VB code editor (for the command button with caption "Shift
Entities").




Thulasiram[_2_]

Transform entities from column of 1 sheet1 to row of another sheet
 
Hello.

When I paste the code in the script editor, i get an error in the
following lines.

Range("A1").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True

please help. it will b so nice of you.

Awaiting your response,
Thulasiram

Die_Another_Day wrote:
Private Sub ShiftEntities_Click()
Dim wb2 As Workbook
Set wb2 = Workbooks("YourBook2.xls")
Range("A1:A50").Copy
Windows("Book2").Activate
Range("A1").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
End Sub

HTH

Die_Another_Day
Thulasiram wrote:
How to transfer the entities in the columns of one worksheet to rows of
another worksheet in an Excel book?. For example I would like to copy 50
entities in column A of worksheet 1 to row 1 of worksheet 2.

So, for the above question I would like to know the code that should be
written in the VB code editor (for the command button with caption "Shift
Entities").




All times are GMT +1. The time now is 07:34 AM.

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