View Single Post
  #20   Report Post  
Posted to microsoft.public.excel.worksheet.functions
david david is offline
external usenet poster
 
Posts: 24
Default Conitional copying of a serie of rows from one spreadsheet to

Max

I (hopefully finally but I can't help fiddling with things) want to
create a page similar to the report for each class that could pick up
the student name from the 'Control' Page and only print the entries for
that student for the date ranges.

I anticipated a validation box on the control page that picks up the
student lists for that clas and then entering the start and end date
for this report.

I expected it would be easy to copy and print the previous report but I
get the student i want but also ohers as well.

I tried to upload thisversion to savefile.com but thre is an error and
I can't do it.

Many thanks

David


david wrote:

Thanks Max this seems to be working OK

One final question and please ignore this if I am taking up too much of
your time.

I have tweaked the file to add summary pages for each of the 4 classes
together with the printout page which pulls its criteria from from the
'Control' sheet.

What I want to be able to do is print this 'Printout' page via a macro.
So I would select the form from the dropdown box on the control page
and then press a macro button. To do this I presume I need to be able
to detect which is the last line that there is any data in so the print
range can be set- how can I do this?


the file can be downloaded from

http://savefile.com/projects/857497

Thanks

David


Max wrote:
"david" wrote:
When I click on the 'New Entry' macro on the 'Y9_Incidents' sheet it
counts the cell reference number down in the 'O' column of the
'Printout' sheet.

I tried making it an absolute rather than a relative reference but I
can't get that to work.


In sheet: Printout,

Try this revised criteria formula* in O6, filled down to O100 (say):
=IF(OR(Control!$C$9="",Control!$C$10="",Control!$C $10=""),"",
IF(INDEX(INDIRECT("'Y9Incidents'!B14:B1000"),ROW(A 1))="","",
IF(AND(INDEX(INDIRECT("'Y9Incidents'!B14:B1000"),R OW(A1))=Control!$C$9,
INDEX(INDIRECT("'Y9Incidents'!D14:D1000"),ROW(A1)) =Control!$C$10,
INDEX(INDIRECT("'Y9Incidents'!D14:D1000"),ROW(A1)) <=Control!$C$11),ROW(),"")))

*to cater for new row insertions by the macro in Y9Incidents

(No change to the other formulas in cols A to K)

An implemented sample is available at:
http://www.savefile.com/files/5487340
incident_Book_for_playY9_1.xls

Test it out (works ok here, under light testing)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---