#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Move data

Hi to all
I am a new user to Excel and I have a list of data that is in 6 lines per
record that I want to move to 6 separate columns per record - can this be
done?
The data goes from A1:A1435
Many thanks in advance
Stephen West
Gold Coast, Australia

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,203
Default Move data

Here's a VBA solution to the issue. It works on a single sheet - moving data
from the column (A) you specify in the code to rows beginning in a column (C)
that you also specify. You can change the Const values as required for
virtually any similar situation.

To put the code to work, open the workbook, press [Alt]+[F11] to open the VB
editor then choose Insert -- Module and copy and paste the code below into
it. Make any edits to the code you need to (shouldn't need any based on your
request). Close the VB Editor. Choose the appropriate worksheet, then use
Tools -- Macro --Macros to put it to work.

Sub TransposeColumnToRows()
Const columnToMove = "A"
Const firstNewColumn = "C"
Const firstRow = 1
Const lastRow = 1435
Const groupSize = 6

Dim RC As Long
Dim CC As Integer
Dim groupCount As Long

'this moves column of data in A
'to rows beginning with column C holding 1st element
Application.ScreenUpdating = False ' improve performance speed
For RC = firstRow To lastRow - groupSize Step groupSize
groupCount = groupCount + 1
For CC = 0 To groupSize - 1
Range(firstNewColumn & groupCount).Offset(0, CC) = _
Range(columnToMove & RC).Offset(CC, 0)
Next ' CC loop end
Next ' RC loop end
End Sub


"Its me" wrote:

Hi to all
I am a new user to Excel and I have a list of data that is in 6 lines per
record that I want to move to 6 separate columns per record - can this be
done?
The data goes from A1:A1435
Many thanks in advance
Stephen West
Gold Coast, Australia

.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,203
Default Move data

If you want a worksheet formula solution, put this formula into cell C1:

=OFFSET($A$1,(COLUMN()-COLUMN($C4)+(ROW()-ROW(A$1))*6),0)
fill it to the right to column H and then fill the entire group down until
you've gone far enough to capture all of the data in the column ... down to
about row 240.

This just copies the data via formula; if you want to do away with the
entries in column A, start by selecting all of the cells with the formulas in
them and use Edit -- Copy followed by Edit -- Paste Special with 'Values'
ticked. After you do that, you can clear out column A.




"Its me" wrote:

Hi to all
I am a new user to Excel and I have a list of data that is in 6 lines per
record that I want to move to 6 separate columns per record - can this be
done?
The data goes from A1:A1435
Many thanks in advance
Stephen West
Gold Coast, Australia

.

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
How do I move this data? Paul New Users to Excel 3 October 2nd 08 03:26 PM
Move data Horacio Excel Worksheet Functions 2 October 31st 06 04:14 PM
Move data? L. Setting up and Configuration of Excel 12 January 24th 06 10:13 PM
Macro to move data to different column based on data in another co malycom Excel Discussion (Misc queries) 3 August 2nd 05 07:07 PM
enter data in cell which will start macro to move data to sheet2 Tommy Excel Discussion (Misc queries) 0 May 12th 05 05:00 PM


All times are GMT +1. The time now is 03:33 PM.

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

About Us

"It's about Microsoft Excel"