Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 139
Default Link transposed data from one sheet to another for DB purposes

I have a spreadsheet which contains a series of data that spreads accross
many columns and four fows. This data repeats itself over and over every four
rows down. In the example below, each course is offered in four rooms, the
following columns represent days 1-5 and the hours logged in each room for
the specific class.

Sheet1 contains:
Course Room 1 2 3 4 5
Transition Red 8 8 8 8 8
Transition Blue 2 2 2 5 5
Transition Green 0 0 0 0 0
Transition Yellow 1 2 2 2 2
STAR Red 8 8 8 8 2
STAR Blue 2 2 1 1 1
STAR Green 4 4 4 4 4
STAR Yellow 8 8 8 8 8

What I need to do, is keep this spreadsheet view for easy to data enter
purposes but link it to another spreadsheet that converts it into standard
database format. See example below:

Sheet2 contains:
Course Room Day Hrs
Transition Red 1 8
Transition Red 2 8
Transition Red 3 8
Transition Red 4 8
Transition Red 5 8
Transition Blue 1 2
Transition Blue 2 2
Transition Blue 3 2
Transition Blue 4 5
Transition Blue 5 5
etc ...

Is there a simple formula I can enter into each column that I can easily
drag/copy down the rows to continue to select the repeating series of 4 rows
and 7 columns? I'd like to have the formula so that I can continue to drag it
down to link to any new data entered at the end of the table that the data is
entered in.

Can you help me?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 179
Default Link transposed data from one sheet to another for DB purposes

That's how i would do it

Sheet1 = sourcedata
Sheet2 = Data for import in database

on Sheet2!A2 put following formula:
=IF(INDIRECT("Sheet1!A" &
(ROW()-2-MOD(ROW()-2,5))/5+2)="","",INDIRECT("Sheet1!A" &
(ROW()-2-MOD(ROW()-2,5))/5+2))

on Sheet2!B2:
=IF(INDIRECT("Sheet1!A" &
(ROW()-2-MOD(ROW()-2,5))/5+2)="","",INDIRECT("Sheet1!B" &
(ROW()-2-MOD(ROW()-2,5))/5+2))

on Sheet2!C2:
=IF(INDIRECT("Sheet1!A"&(ROW()-2-MOD(ROW()-2,5))/5+2)="","",INDIRECT("sheet1!"&ADDRESS((ROW()-2-MOD(ROW()-2,5))/5+2,MOD(ROW()-2,5)+3)))

Those formulas can now be copied down until row 65536 and works.

If you want to start on a different row then 2 you have to change some
numbers.
(Some 2 have to be changed in to another rownumber, but not every 2!)
Just ask if you need help.

Carlo

"Tina" wrote:

I have a spreadsheet which contains a series of data that spreads accross
many columns and four fows. This data repeats itself over and over every four
rows down. In the example below, each course is offered in four rooms, the
following columns represent days 1-5 and the hours logged in each room for
the specific class.

Sheet1 contains:
Course Room 1 2 3 4 5
Transition Red 8 8 8 8 8
Transition Blue 2 2 2 5 5
Transition Green 0 0 0 0 0
Transition Yellow 1 2 2 2 2
STAR Red 8 8 8 8 2
STAR Blue 2 2 1 1 1
STAR Green 4 4 4 4 4
STAR Yellow 8 8 8 8 8

What I need to do, is keep this spreadsheet view for easy to data enter
purposes but link it to another spreadsheet that converts it into standard
database format. See example below:

Sheet2 contains:
Course Room Day Hrs
Transition Red 1 8
Transition Red 2 8
Transition Red 3 8
Transition Red 4 8
Transition Red 5 8
Transition Blue 1 2
Transition Blue 2 2
Transition Blue 3 2
Transition Blue 4 5
Transition Blue 5 5
etc ...

Is there a simple formula I can enter into each column that I can easily
drag/copy down the rows to continue to select the repeating series of 4 rows
and 7 columns? I'd like to have the formula so that I can continue to drag it
down to link to any new data entered at the end of the table that the data is
entered in.

Can you help me?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 179
Default Link transposed data from one sheet to another for DB purposes

Sorry, just saw that i forgot your Day Column!!

Put the formula from C2 that i told you in the post before, into D2 and in
C2 put:
=MOD(ROW()-2,5)+1

the same goes here with the 2nd row!!

Carlo

"Tina" wrote:

I have a spreadsheet which contains a series of data that spreads accross
many columns and four fows. This data repeats itself over and over every four
rows down. In the example below, each course is offered in four rooms, the
following columns represent days 1-5 and the hours logged in each room for
the specific class.

Sheet1 contains:
Course Room 1 2 3 4 5
Transition Red 8 8 8 8 8
Transition Blue 2 2 2 5 5
Transition Green 0 0 0 0 0
Transition Yellow 1 2 2 2 2
STAR Red 8 8 8 8 2
STAR Blue 2 2 1 1 1
STAR Green 4 4 4 4 4
STAR Yellow 8 8 8 8 8

What I need to do, is keep this spreadsheet view for easy to data enter
purposes but link it to another spreadsheet that converts it into standard
database format. See example below:

Sheet2 contains:
Course Room Day Hrs
Transition Red 1 8
Transition Red 2 8
Transition Red 3 8
Transition Red 4 8
Transition Red 5 8
Transition Blue 1 2
Transition Blue 2 2
Transition Blue 3 2
Transition Blue 4 5
Transition Blue 5 5
etc ...

Is there a simple formula I can enter into each column that I can easily
drag/copy down the rows to continue to select the repeating series of 4 rows
and 7 columns? I'd like to have the formula so that I can continue to drag it
down to link to any new data entered at the end of the table that the data is
entered in.

Can you help me?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 139
Default Link transposed data from one sheet to another for DB purposes

That works absolutely BEAUTIFUL! Can you tell me, based on the formula you
provided, if I have 80 days, rather than 5, where do I tweak the formula?

Thanks!
Tina

"Carlo" wrote:

Sorry, just saw that i forgot your Day Column!!

Put the formula from C2 that i told you in the post before, into D2 and in
C2 put:
=MOD(ROW()-2,5)+1

the same goes here with the 2nd row!!

Carlo

"Tina" wrote:

I have a spreadsheet which contains a series of data that spreads accross
many columns and four fows. This data repeats itself over and over every four
rows down. In the example below, each course is offered in four rooms, the
following columns represent days 1-5 and the hours logged in each room for
the specific class.

Sheet1 contains:
Course Room 1 2 3 4 5
Transition Red 8 8 8 8 8
Transition Blue 2 2 2 5 5
Transition Green 0 0 0 0 0
Transition Yellow 1 2 2 2 2
STAR Red 8 8 8 8 2
STAR Blue 2 2 1 1 1
STAR Green 4 4 4 4 4
STAR Yellow 8 8 8 8 8

What I need to do, is keep this spreadsheet view for easy to data enter
purposes but link it to another spreadsheet that converts it into standard
database format. See example below:

Sheet2 contains:
Course Room Day Hrs
Transition Red 1 8
Transition Red 2 8
Transition Red 3 8
Transition Red 4 8
Transition Red 5 8
Transition Blue 1 2
Transition Blue 2 2
Transition Blue 3 2
Transition Blue 4 5
Transition Blue 5 5
etc ...

Is there a simple formula I can enter into each column that I can easily
drag/copy down the rows to continue to select the repeating series of 4 rows
and 7 columns? I'd like to have the formula so that I can continue to drag it
down to link to any new data entered at the end of the table that the data is
entered in.

Can you help me?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Link transposed data from one sheet to another for DB purposes

Another play which should deliver it ..

Assuming source data in Sheet1 is within cols A to G as posted, from row1 down

In Sheet2,

In A2:
=OFFSET(Sheet1!$A$2,INT((ROWS($1:1)-1)/5),)

In B2:
=OFFSET(Sheet1!$B$2,INT((ROWS($1:1)-1)/5),)

In C2:
=OFFSET(Sheet1!$C$1,,MOD(ROWS($1:1)-1,5))

In D2:
=OFFSET(Sheet1!$C$2,INT((ROWS($1:1)-1)/5),MOD(ROWS($1:1)-1,5))

Select A2:D2, copy down as far as required.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Tina" wrote:
I have a spreadsheet which contains a series of data that spreads accross
many columns and four fows. This data repeats itself over and over every four
rows down. In the example below, each course is offered in four rooms, the
following columns represent days 1-5 and the hours logged in each room for
the specific class.

Sheet1 contains:
Course Room 1 2 3 4 5
Transition Red 8 8 8 8 8
Transition Blue 2 2 2 5 5
Transition Green 0 0 0 0 0
Transition Yellow 1 2 2 2 2
STAR Red 8 8 8 8 2
STAR Blue 2 2 1 1 1
STAR Green 4 4 4 4 4
STAR Yellow 8 8 8 8 8

What I need to do, is keep this spreadsheet view for easy to data enter
purposes but link it to another spreadsheet that converts it into standard
database format. See example below:

Sheet2 contains:
Course Room Day Hrs
Transition Red 1 8
Transition Red 2 8
Transition Red 3 8
Transition Red 4 8
Transition Red 5 8
Transition Blue 1 2
Transition Blue 2 2
Transition Blue 3 2
Transition Blue 4 5
Transition Blue 5 5
etc ...

Is there a simple formula I can enter into each column that I can easily
drag/copy down the rows to continue to select the repeating series of 4 rows
and 7 columns? I'd like to have the formula so that I can continue to drag it
down to link to any new data entered at the end of the table that the data is
entered in.

Can you help me?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Link transposed data from one sheet to another for DB purposes

Just change the "5" within the formulas to "80" if you have 80 days instead
of 5
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 139
Default Link transposed data from one sheet to another for DB purposes

THANK YOU! You don't know how many hours you just saved me!!! Now I just
need to figure out what exactly this formula means and how it's working.

"Max" wrote:

Just change the "5" within the formulas to "80" if you have 80 days instead
of 5
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Link transposed data from one sheet to another for DB purposes

welcome, Tina.

Tinker with these in 2 empty cols to see
the series / pattern generated by the core INT and MOD parts
(which supply the required returns for the row/col params in OFFSET)

In any cell: =INT((ROWS($1:1)-1)/5)
copied down will produce an incrementing series of:
5 zeros, then 5 ones, then 5 twos, and so on

Similarly, in any cell: =MOD(ROWS($1:1)-1,5)
copied down will yield a repeating continuous series of 5 numbers: 0,1,2,3,4
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Tina" wrote in message
...
THANK YOU! You don't know how many hours you just saved me!!! Now I just
need to figure out what exactly this formula means and how it's working.



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 21
Default Link transposed data from one sheet to another for DB purposes

Hi Max,

I saw your advice to Tina.
I had a slightly more complicated worsheet than Tina and was trying to use
your advise. But it doesn't work that well.
Maybe I do not understand the formular clearly.
Wondering whether can you help me in that?

Source Data:-
Customer Country1 Name Data Aug-07 Sep-07 Oct-07
Cust A Malaysia Apple Sales 7,253 2,115
Cust A Malaysia Apple Volume 480 140
Cust A Malaysia Apple SASP 15.110 15.110
Cust A Malaysia Orange Sales 3,050 10,750 11,150
Cust A Malaysia Orange Volume 15,250 53,750 55,750
Cust A Malaysia Orange SASP 0.200 0.200 0.200
Cust B US Pear Sales 2,369
Cust B US Pear Volume 360
Cust B US Pear SASP 6.580
Cust B US Orange Sales 6,075 9,113 13,669
Cust B US Orange Volume 900 1,350 2,025
Cust B US Orange SASP 6.750 6.750 6.750
Cust C China Pear Sales 570 570 760
Cust C China Pear Volume 30 30 35
Cust C China Pear SASP 19.000 19.000 21.714
Cust D US Cherry Sales 5,832 4,860
Cust D US Cherry Volume 129,600 108,000
Cust D US Cherry SASP 0.045 0.045
Cust D US Orange Sales 720 24,000 18,000
Cust D US Orange Volume 4 120 90
Cust D US Orange SASP 200.000 200.000 200.000


Need to transpose to data to col into:-
Customer, cty, name date, Sales, vol and SASP

Customer Country1 Name Date Sales Volume SASP
Cust A Malaysia Apple Aug-07 7252.8 480 15.11
Cust A Malaysia Apple Oct-07 2115.4 140 15.11
Cust A Malaysia Orange Aug-07 3,050 15,250 0.200
Cust A Malaysia Orange Sep-07 10,750 53,750 0.200
Cust A Malaysia Orange Oct-07 11,150 55,750 0.200
etc
etc

Can you kindly help me?

Thank



"Max" wrote:

welcome, Tina.

Tinker with these in 2 empty cols to see
the series / pattern generated by the core INT and MOD parts
(which supply the required returns for the row/col params in OFFSET)

In any cell: =INT((ROWS($1:1)-1)/5)
copied down will produce an incrementing series of:
5 zeros, then 5 ones, then 5 twos, and so on

Similarly, in any cell: =MOD(ROWS($1:1)-1,5)
copied down will yield a repeating continuous series of 5 numbers: 0,1,2,3,4
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Tina" wrote in message
...
THANK YOU! You don't know how many hours you just saved me!!! Now I just
need to figure out what exactly this formula means and how it's working.




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 to insert rows in transposed data table? Mike Excel Worksheet Functions 2 June 14th 06 08:27 AM
= (other sheet, but transposed!) Ed Excel Discussion (Misc queries) 6 June 3rd 06 06:16 PM
how do i link data from one sheet to another if value keep changin michellebabe Excel Worksheet Functions 0 January 25th 06 09:38 PM
Want to link several sheets in single workbook for searching purposes. halfordryan Excel Discussion (Misc queries) 0 August 31st 05 06:47 PM
How do I avoid saving multiple data files for versioning purposes. [email protected] Excel Discussion (Misc queries) 1 December 13th 04 12:57 PM


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