View Single Post
  #8   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

Thanks Max - you are a wonder - I now need to sit down with it and
ammend it slightly to make it fit the exact data set I have.

Presumably there would be no problem having both the 'x' criteria that
the selection are being made on and the start and end dates come from
specific cell references.

david




david wrote:
Max

I pressed reply before I meant to!

I am a bit confused as to what thye ($G:$G) section of the formula is
actiually doing - can you tell me please.
david wrote:

David

Max

Thanks very much for the help

=IF(ROW(A1)COUNT($G:$G),"",INDEX(Sheet1!A:A,MATCH (SMALL($G:$G,ROW(A1)),$G:*$G,0)))

However, when I put this formula into Excel it give an error at the
penultimate G - is there something I am doing wrong?

David


Max wrote:
Put in G2:
=IF(Sheet1!C2="","",IF(AND(Sheet1!C2="x",Sheet1!D2 =--"1-May-2006",Sheet1!D2<=--"31-May-2006"),ROW(),""))

For greater flexibility, instead of hardcoding the 3 criteria, the above
formula could point to 3 cells, say H1:H3, where H1 will house the value in
col C, and H2:H3 will house the start and end dates of the desired period.

For the above, we could then put instead in G2, and copy down to G100:
=IF(OR($H$1="",$H$2="",$H$3=""),"",IF(Sheet1!C2="" ,"",IF(AND(Sheet1!C2=$H$1,Sheet1!D2=$H$2,Sheet1!D 2<=$H$3),ROW(),"")))

Then just change/input the criteria values within H1:H3
to obtain the required results in cols A to G
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---