Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Simple Question?
Gday
Is it possible to transfer data from two columns 1000+ cells in each into a table 10 x 20 ie A1:B1000 change to A1:T100 so it becomes simpler to view and print? Thankyou again Ajay |
#2
|
|||
|
|||
VBA comes to the rescue:
Sub Xfer() 'Untested for i=1 to 2000 Range("A1:T100").cells(i) = range("A1:B1000").cells(i) Next End Sub Bob Umlas Excel MVP I'm leading a FREE 1-hour online Webinar on Excel Tips & Tricks. Dec 16, Jan 14, Jan 27 from 4-5PM (each session is the same). If interested, go to http://www.iil.com, click on the yellow/orange "Try a free webinar" link on the left side, click the Microsoft Excel Tips & Tricks link, follow instructions to register. "Ajay" wrote in message ... Gday Is it possible to transfer data from two columns 1000+ cells in each into a table 10 x 20 ie A1:B1000 change to A1:T100 so it becomes simpler to view and print? Thankyou again Ajay |
#3
|
|||
|
|||
This gave me a different result that Bob's suggestion:
Option Explicit Sub testme01() Dim iRow As Long Dim oCol As Long With ActiveSheet oCol = 1 For iRow = 101 To 1000 Step 100 oCol = oCol + 2 .Cells(1, oCol).Resize(100, 2).Value _ = .Cells(iRow, 1).Resize(100, 2).Value Next iRow 'if you want to clean up after A1000 '.Range("a1001", .Cells(.Rows.Count, "A")).EntireRow.Delete End With End Sub (not sure what you want the output to look like) Ajay wrote: Gday Is it possible to transfer data from two columns 1000+ cells in each into a table 10 x 20 ie A1:B1000 change to A1:T100 so it becomes simpler to view and print? Thankyou again Ajay -- Dave Peterson |
#4
|
|||
|
|||
Morning Dave
Thanks for this will give it a try this morning Ajay "Dave Peterson" wrote: This gave me a different result that Bob's suggestion: Option Explicit Sub testme01() Dim iRow As Long Dim oCol As Long With ActiveSheet oCol = 1 For iRow = 101 To 1000 Step 100 oCol = oCol + 2 .Cells(1, oCol).Resize(100, 2).Value _ = .Cells(iRow, 1).Resize(100, 2).Value Next iRow 'if you want to clean up after A1000 '.Range("a1001", .Cells(.Rows.Count, "A")).EntireRow.Delete End With End Sub (not sure what you want the output to look like) Ajay wrote: Gday Is it possible to transfer data from two columns 1000+ cells in each into a table 10 x 20 ie A1:B1000 change to A1:T100 so it becomes simpler to view and print? Thankyou again Ajay -- Dave Peterson |
#5
|
|||
|
|||
Morning Bob
Thanks for the help Will try this as well as Dave's code this morning will let u know the result Ajay "Bob Umlas" wrote: VBA comes to the rescue: Sub Xfer() 'Untested for i=1 to 2000 Range("A1:T100").cells(i) = range("A1:B1000").cells(i) Next End Sub Bob Umlas Excel MVP I'm leading a FREE 1-hour online Webinar on Excel Tips & Tricks. Dec 16, Jan 14, Jan 27 from 4-5PM (each session is the same). If interested, go to http://www.iil.com, click on the yellow/orange "Try a free webinar" link on the left side, click the Microsoft Excel Tips & Tricks link, follow instructions to register. "Ajay" wrote in message ... Gday Is it possible to transfer data from two columns 1000+ cells in each into a table 10 x 20 ie A1:B1000 change to A1:T100 so it becomes simpler to view and print? Thankyou again Ajay |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
basic pie chart question | Charts and Charting in Excel | |||
Ploting dates against a calendar and not as a simple events | Charts and Charting in Excel | |||
Barchart 'GroupBy' Question | Charts and Charting in Excel | |||
Question on VBA | Excel Discussion (Misc queries) | |||
Simple VBA question | Excel Discussion (Misc queries) |