"david" wrote:
I have a large worksheet with data in it. I want to copy only those
rows that meet certain criteria to another worksheet. For instance - If
there is a certain value in column C and a date in column D falls
between a certain range I want to copy the data in the row to another
summary worksheet. I want to ignore the rows where the conditions are
not me so I don't have gaps in the summary.
One play which makes it dynamic to the source ..
Assume source data in Sheet1, cols A to F (say),
data from row2 to a max expected row100
Assume the required lines to be copied into a new sheet are those where col
C = "x", and where the dates in col D fall within the month of May 2006 (say)
In Sheet2,
Put in A2:
=IF(ROW(A1)COUNT($G:$G),"",INDEX(Sheet1!A:A,MATCH (SMALL($G:$G,ROW(A1)),$G:$G,0)))
Copy A2 to F2
Put in G2:
=IF(Sheet1!C2="","",IF(AND(Sheet1!C2="x",Sheet1!D2 =--"1-May-2006",Sheet1!D2<=--"31-May-2006"),ROW(),""))
(Leave G1 empty)
Select A2:G2, fill down to G100
Format col D as dates
The above will return the required results from the source sheet, all neatly
bunched at the top. (Hide away the criteria col G)
Adapt to suit ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---