Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Tranposing Columns to Rows for Thousand Records


I am looking for a macro that will transpose a long single column o
data (each record is seperated by a blank cell in the column) int
seperate rows (each row representing a speperate record) This data se
only has nine fields per record, no formulas. I dont want to do thi
by hand.

Thanks

--
unknowndevic
-----------------------------------------------------------------------
unknowndevice's Profile: http://www.excelforum.com/member.php...fo&userid=2664
View this thread: http://www.excelforum.com/showthread.php?threadid=39949

  #2   Report Post  
Posted to microsoft.public.excel.programming
Ian Ian is offline
external usenet poster
 
Posts: 238
Default Tranposing Columns to Rows for Thousand Records

Assuming source data is in column A and data is to be transposed to columns
B to K (including the blank cell)

Sub TransposeData()
sr = 1
dr = 0
For sr = 1 To 100 Step 10 ' Change 100 to suit number of rows in the source
column
dr = dr + 1
Range(Cells(sr, 1), Cells(sr + 9, 1)).Select ' Select A1:A10 first
loop, then A11:A20 next loop etc
Selection.Copy
Cells(dr, 2).Select ' Select B1 first loop, then B2 second loop etc
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Next
End Sub

--
Ian
--
"unknowndevice"
wrote in message
news:unknowndevice.1udpqm_1125072336.1956@excelfor um-nospam.com...

I am looking for a macro that will transpose a long single column of
data (each record is seperated by a blank cell in the column) into
seperate rows (each row representing a speperate record) This data set
only has nine fields per record, no formulas. I dont want to do this
by hand.

Thanks!


--
unknowndevice
------------------------------------------------------------------------
unknowndevice's Profile:
http://www.excelforum.com/member.php...o&userid=26646
View this thread: http://www.excelforum.com/showthread...hreadid=399495



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Tranposing Columns to Rows for Thousand Records

unknowndevice wrote:
I am looking for a macro that will transpose a long single column of
data (each record is seperated by a blank cell in the column) into
seperate rows (each row representing a speperate record) This data set
only has nine fields per record, no formulas. I dont want to do this
by hand.

Thanks!



Asuming your data is in A1:A1000, if the functions in the freely
downloadable file at http://home.pacbell.net are available to your
workbook you can array enter into B1:K100

=ArrayReshape(A1:A1000,100,10)

Alan Beban
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Tranposing Columns to Rows for Thousand Records

You have other replies to your post in .misc.

unknowndevice wrote:

I am looking for a macro that will transpose a long single column of
data (each record is seperated by a blank cell in the column) into
seperate rows (each row representing a speperate record) This data set
only has nine fields per record, no formulas. I dont want to do this
by hand.

Thanks!

--
unknowndevice
------------------------------------------------------------------------
unknowndevice's Profile: http://www.excelforum.com/member.php...o&userid=26646
View this thread: http://www.excelforum.com/showthread...hreadid=399495


--

Dave Peterson
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
Change rows to columns for similar records Katherine Excel Discussion (Misc queries) 3 May 12th 10 09:07 AM
how do i paste rows/columns avoiding hidden rows/columns perezli Excel Discussion (Misc queries) 1 January 30th 09 03:58 PM
Excel 2003 - change columns to rows and rows to columns Trish Excel Discussion (Misc queries) 0 August 17th 07 02:22 AM
Excel 2003 - change columns to rows and rows to columns JLatham Excel Discussion (Misc queries) 0 August 17th 07 02:05 AM
Counting records f(x) two columns jkl Excel Discussion (Misc queries) 6 May 8th 07 05:39 PM


All times are GMT +1. The time now is 11:44 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"