#1   Report Post  
gbeard
 
Posts: n/a
Default moving data

What is the easiest way of moving data from from a1:a5 to a1:e5? I have
hundreds of entries down column A and would like to get them listed in
a1:d500. Each entry fills 5 rows in column A and I'd like them to fill the
first 5 columns (a to e) in consecutive rows (1-500).

--
Gary Beard


  #2   Report Post  
Don Guillett
 
Posts: n/a
Default

try this. Then just delete col a
Sub transposeem()
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row Step 5
x = Cells(Rows.Count, 2).End(xlUp).Row + 1
Cells(i, 1).Resize(5, 1).Copy
Cells(x, 2).PasteSpecial Paste:=xlPasteAll, Transpose:=True
Next i
End Sub

--
Don Guillett
SalesAid Software

"gbeard" wrote in message
m...
What is the easiest way of moving data from from a1:a5 to a1:e5? I have
hundreds of entries down column A and would like to get them listed in
a1:d500. Each entry fills 5 rows in column A and I'd like them to fill

the
first 5 columns (a to e) in consecutive rows (1-500).

--
Gary Beard




  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

Enter this formula in B1.

=OFFSET($A$1,(ROW()-1)*5+COLUMN()-2,0)

Drag/copy across to F1

Select B1:F1

Drag/copy down until you get zeros showing up.

Select Columns B:F and EditCopy then EditPaste Special(in
place)ValuesOKEsc.

Delete column A.

Alternative is a macro.....

Sub ColtoRows_NoError()
Dim Rng As Range
Dim i As Long
Dim j As Long
Dim nocols As Integer
Application.ScreenUpdating = False
Set Rng = Cells(Rows.Count, 1).End(xlUp)
j = 1
On Error Resume Next
nocols = InputBox("Enter Number of Columns Desired")
For i = 1 To Rng.Row Step nocols
Cells(j, "A").Resize(1, nocols).Value = _
Application.Transpose(Cells(i, "A").Resize(nocols, 1))
j = j + 1
Next
Range(Cells(j, "A"), Cells(Rng.Row, "A")).ClearContents
Application.ScreenUpdating = True
End Sub

In your case, enter 5 in the inputbox when it pops up.

Gord Dibben Excel MVP


On Wed, 04 May 2005 17:58:08 GMT, "gbeard" wrote:

What is the easiest way of moving data from from a1:a5 to a1:e5? I have
hundreds of entries down column A and would like to get them listed in
a1:d500. Each entry fills 5 rows in column A and I'd like them to fill the
first 5 columns (a to e) in consecutive rows (1-500).


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding more source data to existing scatter plot Tom Charts and Charting in Excel 1 March 21st 05 10:03 PM
Why " data analysis plus " override " data analysis " once instal. Alfred H K Yip Excel Worksheet Functions 1 March 20th 05 08:10 AM
moving data in excel without deleting existing data jigna Excel Discussion (Misc queries) 1 January 30th 05 11:35 AM
Running Data Table using an input that triggers DDE linked data [email protected] Excel Discussion (Misc queries) 1 December 16th 04 11:56 AM
Extending a Chart Data Series from an Array - Can it be done? Jon Peltier Charts and Charting in Excel 4 November 30th 04 03:30 AM


All times are GMT +1. The time now is 09:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"