![]() |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 06:46 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com