Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi I currently have a workbook that contains two worksheets 'results' and
'data' The information currently runs in two rows across the page a1, b1, c1, d1, e1 etc. needs to become a1, a2, a3, a4, a5 and a2, b2, c2, d2, e2, needs to become b1, b2, b3, b4, b5 etc. Any suggestions on the easiest way to do this? Cheers, Allan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I think you can do this via a Paste function with the Transpose indication = True. I have recorded a small macro which does this job. Sheets("Sheet1").Select Range("A1:C3").Select Selection.Copy Sheets("Sheet2").Select Selection.PasteSpecial Paste:=xlPasteAll, peration:=xlNone, SkipBlanks:= False, Transpose:=True kind regards, Filip Henderieckx *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Option Explicit
Sub Macro1() Dim iNumRows As Integer, iNumCol As Integer, r As Integer, c As Integer iNumRows = Sheets("data").UsedRange.Rows.Count iNumCol = Sheets("data").UsedRange.Columns.Count For r = 1 To iNumRows For c = 1 To iNumCol Sheets("result").Cells(c, r) = Sheets("data").Cells(r, c) Next Next End Sub *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ta guys, both really helped me out of a sticky situation.
Cheers, Allan "allanb" wrote: Hi I currently have a workbook that contains two worksheets 'results' and 'data' The information currently runs in two rows across the page a1, b1, c1, d1, e1 etc. needs to become a1, a2, a3, a4, a5 and a2, b2, c2, d2, e2, needs to become b1, b2, b3, b4, b5 etc. Any suggestions on the easiest way to do this? Cheers, Allan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy from worksheet in macro | Excel Discussion (Misc queries) | |||
Copy Macro with Worksheet | Excel Discussion (Misc queries) | |||
VB Macro to Copy from Worksheet | Excel Discussion (Misc queries) | |||
Macro to copy worksheet | Excel Discussion (Misc queries) | |||
How? Macro to copy range to new worksheet, name new worksheet, loop | Excel Programming |