Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default data in rows to a single column


Hi everyone! Does anyone know an excel macro that would enable me to put
row data into a single column? I basically have quarterly data for 5
years with each row containing the quarterly data for each year (row).
I just want to make the data into a time series. So it's something
like: (ignore the dots)


Year ...... Q1 ....... Q2 ....... Q3 ....... Q4
1990 ...... 2 ......... 5 ......... 3 ......... 9
1991 ...... 8 ......... 1 ......... 4 ......... 6

and I want a macro that would put the row data into a single column so
that it would look like:

2
5
3
9
8
1
4
6

Any assistance would be greatly appreciated. Thanks!


--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=531174

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 510
Default data in rows to a single column

Hi,
Assuming your data ranges from B2 to E6, and that column G is empty :
Sub Macro1()
Dim i As Integer
Dim j As Integer
j = 2
For i = 2 To 6
Range("B" & i, "E" & i).Copy
Range("G" & j).Select
Selection.PasteSpecial Paste:=xlAll, Transpose:=True
j = j + 4
Next i
Application.CutCopyMode = False
Range("A1").Select
End Sub

HTH
Cheers
Carim

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default data in rows to a single column

You can do it with a formula.
In new sheet cell A1, enter:
=INDEX(Sheet1!$B$2:$E$3,INT((ROW()-1)/4)+1,MOD(ROW()-1,4)+1)
then drag down

Adjust table reference (Sheet1!$B$2:$E$3) to your needs

HTH
--
AP

"uberathlete" a
écrit dans le message de
...

Hi everyone! Does anyone know an excel macro that would enable me to put
row data into a single column? I basically have quarterly data for 5
years with each row containing the quarterly data for each year (row).
I just want to make the data into a time series. So it's something
like: (ignore the dots)


Year ...... Q1 ....... Q2 ....... Q3 ....... Q4
1990 ...... 2 ......... 5 ......... 3 ......... 9
1991 ...... 8 ......... 1 ......... 4 ......... 6

and I want a macro that would put the row data into a single column so
that it would look like:

2
5
3
9
8
1
4
6

Any assistance would be greatly appreciated. Thanks!


--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile:

http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=531174



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default data in rows to a single column


Ardus Petus Wrote:
You can do it with a formula.
In new sheet cell A1, enter:
=INDEX(Sheet1!$B$2:$E$3,INT((ROW()-1)/4)+1,MOD(ROW()-1,4)+1)
then drag down

Adjust table reference (Sheet1!$B$2:$E$3) to your needs

HTH
--
AP

"uberathlete"
a
écrit dans le message de
...

Hi everyone! Does anyone know an excel macro that would enable me to

put
row data into a single column? I basically have quarterly data for 5
years with each row containing the quarterly data for each year

(row).
I just want to make the data into a time series. So it's something
like: (ignore the dots)


Year ...... Q1 ....... Q2 ....... Q3 ....... Q4
1990 ...... 2 ......... 5 ......... 3 ......... 9
1991 ...... 8 ......... 1 ......... 4 ......... 6

and I want a macro that would put the row data into a single column

so
that it would look like:

2
5
3
9
8
1
4
6

Any assistance would be greatly appreciated. Thanks!


--
uberathlete

------------------------------------------------------------------------
uberathlete's Profile:

http://www.excelforum.com/member.php...o&userid=28388
View this thread:

http://www.excelforum.com/showthread...hreadid=531174



Thanks for replying Ardus! I tried it but it doesn't seem to work. It
basically lists diagonal values in the column. So, when I drag down,
the column looks like:

2
1
and so on and so forth.

any suggestions?


--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile: http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=531174

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default data in rows to a single column


Hi,
Assuming your data ranges from B2 to E6, and that column G is empty :
Sub Macro1()
Dim i As Integer
Dim j As Integer
j = 2
For i = 2 To 6
Range("B" & i, "E" & i).Copy
Range("G" & j).Select
Selection.PasteSpecial Paste:=xlAll, Transpose:=True
j = j + 4
Next i
Application.CutCopyMode = False
Range("A1").Select
End Sub

HTH


--
Carim
------------------------------------------------------------------------
Carim's Profile: http://www.excelforum.com/member.php...o&userid=33259
View this thread: http://www.excelforum.com/showthread...hreadid=531174



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default data in rows to a single column

I entered the formula in A1 of another sheet and dragged down for 8 rows and
it worked fine for me for the values in B2:E2 on Sheet1

--
Regards,
Tom Ogilvy


"uberathlete"
wrote in message
...

Ardus Petus Wrote:
You can do it with a formula.
In new sheet cell A1, enter:
=INDEX(Sheet1!$B$2:$E$3,INT((ROW()-1)/4)+1,MOD(ROW()-1,4)+1)
then drag down

Adjust table reference (Sheet1!$B$2:$E$3) to your needs

HTH
--
AP

"uberathlete"
a
écrit dans le message de
...

Hi everyone! Does anyone know an excel macro that would enable me to

put
row data into a single column? I basically have quarterly data for 5
years with each row containing the quarterly data for each year

(row).
I just want to make the data into a time series. So it's something
like: (ignore the dots)


Year ...... Q1 ....... Q2 ....... Q3 ....... Q4
1990 ...... 2 ......... 5 ......... 3 ......... 9
1991 ...... 8 ......... 1 ......... 4 ......... 6

and I want a macro that would put the row data into a single column

so
that it would look like:

2
5
3
9
8
1
4
6

Any assistance would be greatly appreciated. Thanks!


--
uberathlete

------------------------------------------------------------------------
uberathlete's Profile:

http://www.excelforum.com/member.php...o&userid=28388
View this thread:

http://www.excelforum.com/showthread...hreadid=531174



Thanks for replying Ardus! I tried it but it doesn't seem to work. It
basically lists diagonal values in the column. So, when I drag down,
the column looks like:

2
1
and so on and so forth.

any suggestions?


--
uberathlete
------------------------------------------------------------------------
uberathlete's Profile:

http://www.excelforum.com/member.php...o&userid=28388
View this thread: http://www.excelforum.com/showthread...hreadid=531174



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
colating multi rows of data into single rows - no to pivot tables! UKMAN Excel Worksheet Functions 4 March 12th 10 04:11 PM
how to display rows of data in a single column IUM Excel Discussion (Misc queries) 6 December 30th 08 07:29 PM
Gathering rows of data from multiple wrkbks to single column SaipanRick Excel Worksheet Functions 2 June 15th 08 07:39 PM
Transpose data from many horizontal rows into a single column Tinkmodbod Excel Discussion (Misc queries) 3 July 10th 07 04:31 PM
Return Single Row of Numeric Data to Single Column Sam via OfficeKB.com Excel Worksheet Functions 4 December 17th 05 12:31 AM


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