#1   Report Post  
Murtaza
 
Posts: n/a
Default Transforming Data

Consider the the below example:

Sheet1: (This is what I have)
A B C D E F
1 x x x y y y
2 x x x y y y
3 x x x y y y
4 x x x y y y
5 x x x y y y

*Sheet2: (This is how I want it to be)
A B C
1 x x x
2 y y y
3 x x x
4 y y y
5 x x x
6 y y y
7 x x x
8 y y y
9 x x x
10 y y y
* Sheet2 links with Sheet1

Hope this illustrates my problem.....and I am sure you must have some
solution for it.

Thank you,


  #2   Report Post  
Bob Umlas
 
Posts: n/a
Default

This works lightning quick:
Sub ReFlow()
n = 0
For Each x In Sheets("sheet1").Range("A1:F5")
n = n + 1
Sheets("Sheet2").Range("A1:C10").Cells(n).Value = x
Next
End Sub

"Murtaza" <NoEmail@NoEmail wrote in message
...
Consider the the below example:

Sheet1: (This is what I have)
A B C D E F
1 x x x y y y
2 x x x y y y
3 x x x y y y
4 x x x y y y
5 x x x y y y

*Sheet2: (This is how I want it to be)
A B C
1 x x x
2 y y y
3 x x x
4 y y y
5 x x x
6 y y y
7 x x x
8 y y y
9 x x x
10 y y y
* Sheet2 links with Sheet1

Hope this illustrates my problem.....and I am sure you must have some
solution for it.

Thank you,




  #3   Report Post  
Murtaza
 
Posts: n/a
Default

Thanks Bob, It worked after some Range adjustments.

But Still it didn't provide the Links. Can't we do this by using Offset or
Indirect function.....cause Macro sometimes irritates.

Murtaza



"Bob Umlas" wrote in message
...
This works lightning quick:
Sub ReFlow()
n = 0
For Each x In Sheets("sheet1").Range("A1:F5")
n = n + 1
Sheets("Sheet2").Range("A1:C10").Cells(n).Value = x
Next
End Sub

"Murtaza" <NoEmail@NoEmail wrote in message
...
Consider the the below example:

Sheet1: (This is what I have)
A B C D E F
1 x x x y y y
2 x x x y y y
3 x x x y y y
4 x x x y y y
5 x x x y y y

*Sheet2: (This is how I want it to be)
A B C
1 x x x
2 y y y
3 x x x
4 y y y
5 x x x
6 y y y
7 x x x
8 y y y
9 x x x
10 y y y
* Sheet2 links with Sheet1

Hope this illustrates my problem.....and I am sure you must have some
solution for it.

Thank you,






  #4   Report Post  
Alan Beban
 
Posts: n/a
Default

Murtaza wrote:
Consider the the below example:

Sheet1: (This is what I have)
A B C D E F
1 x x x y y y
2 x x x y y y
3 x x x y y y
4 x x x y y y
5 x x x y y y

*Sheet2: (This is how I want it to be)
A B C
1 x x x
2 y y y
3 x x x
4 y y y
5 x x x
6 y y y
7 x x x
8 y y y
9 x x x
10 y y y
* Sheet2 links with Sheet1

Hope this illustrates my problem.....and I am sure you must have some
solution for it.

Thank you,


If the functions in the freely downloadable file at
http://home.pacbell.net/beban are available to your workbook you can
enter into A1:C10 on Sheet2

=ArrayReshape(Sheet1!A1:F5,10,3)

Alan Beban

  #5   Report Post  
Herbert Seidenberg
 
Posts: n/a
Default

In case Alan's excellent macro still irritates you,
here is a way to do it without VBA.
Name your input array Harry. Use InsertNameDefine
Also define these names:
Rolk ={1;2;3;4;5;6;7;8;9;10}
Colk ={1,2,3}
Select your output array and enter into the formula bar
=INDEX(Harry,CEILING(Rolk/2,1),--NOT(MOD(Rolk,2))*3+Colk)
then press Shift+Ctrl+Enter

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
Automatically pasting worksheet data to new worksheet with formulas COntactJason Excel Worksheet Functions 0 August 10th 05 08:22 PM
Inserting Filtered RC cell information into other worksheets Dennis Excel Discussion (Misc queries) 10 July 30th 05 01:54 AM
Pull Current Month's Data Out of List - Repost Karl Burrows Excel Discussion (Misc queries) 4 May 3rd 05 01:06 AM
Line Graph Data Recognition Nat Charts and Charting in Excel 2 April 30th 05 02:07 PM
Running Data Table using an input that triggers DDE linked data [email protected] Excel Discussion (Misc queries) 1 December 16th 04 11:56 AM


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

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"