LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How to copy data from a "parent sheet" to another

Here's the construct write-up for the earlier implemented sample ..

One play which automates it using non-array formulas ..

In sheet: x (the "master")
Assume source data is in cols A to F, data in row2 down,
with the key col = col F (Class)

Note that you'd need to change any class names with "/" to say, underscore,
eg: V 11_12 Boys
This is because the "/" is a prohibited character in sheetnames

Put in G2: =IF(F2="","",IF(COUNTIF(F$2:F2,F2)1,"",ROW()))
Copy down to cover the max expected extent of source data. Leave G1 blank
This col flags unique items (the Classes) with arb row numbers, which will
be read by the formula in H1 across

Put in H1:
=IF(COLUMNS($A:A)COUNT($G:$G),"",INDEX($F:$F,SMAL L($G:$G,COLUMNS($A:A))))
Copy H1 across as far as required to cover the max expected number of unique
Classes
In H1 across will be extracted all the unique Classes neatly bunched to the
left

Put in H2: =IF(OR($F2="",H$1=""),"",IF($F2=H$1,ROW(),""))
Copy H2 across/fill down

Click Insert Name Define
Put under "Names in workbook:": WSN
Put in the "Refers to:" box:
=MID(CELL("Filename",INDIRECT("A1")),FIND("]",CELL("Filename",INDIRECT("A1")))+1,32)
Click OK

The above defines WSN as a name we can use to refer to the sheetname in
formulas.
It will auto-extract the sheetname implicitly. Technique came from a post by
Harlan.

Then, in a new sheet named after one of the Classes, eg: V 9A
With the same col headers pasted into A1:F1

Put in A2:
=IF(ROWS($1:1)COUNT(OFFSET(x!$G:$G,,MATCH(WSN,x!$ H$1:$IV$1,0))),"",
INDEX(x!A:A,MATCH(SMALL(OFFSET(x!$G:$G,,MATCH(WSN, x!$H$1:$IV$1,0)),ROWS($1:1)),OFFSET(x!$G:$G,,MATCH (WSN,x!$H$1:$IV$1,0)),0)))
Copy A2 across to F2, fill down to say F50, to cover the max expected extent
for any Class. Cols A to F will return only the lines for the class: V 9A
from the mastersheet; x, with all lines neatly bunched at the top. Now, just
dress the sheet: V 9A up as desired, then make copies of it, rename each
copy as the other Classes: Pre-Nursery, A 8C, etc and you'd get the
corresponding results for each of those Classes. Adapt to suit ..
--
Max
Singapore
http://savefile.com/projects/236895
Downloads: 16,200, Files: 354, Subscribers: 53
xdemechanik
---




 
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
Excel "Move or Copy" and "Delete" sheet functions dsiama Excel Worksheet Functions 1 December 28th 07 01:57 PM
How to copy or share "Custom Views" from one sheet to another Nauj Solrac Excel Discussion (Misc queries) 1 February 2nd 07 03:49 AM
Retrieving info from "child" to a "parent" document create button to unhide rows Excel Discussion (Misc queries) 0 January 21st 07 10:40 PM
Auto "copy and paste" individual cells from various sheets into one sheet ?? [email protected] Excel Discussion (Misc queries) 2 March 1st 06 03:19 AM
name duplication via "Edit, Move or Copy Sheet" Alan Links and Linking in Excel 2 October 18th 05 12:28 AM


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