View Single Post
  #2   Report Post  
Max
 
Posts: n/a
Default extract name when a date in another cell gets near

Not sure of your set-up, but here's one interp / way ..

Sample construct at:
http://cjoint.com/?lijhId05fe
Extracting_Lines_Date_Criteria_cityfc_wks.xls

In Sheet1
----------
Assume the set-up in cols A to E is:

Due date: 25-Dec-05
Name1 11-Nov-05 N1Assmt1 N1Assmt2 N1Assmt3
Name2 (blank) N2Assmt1 N2Assmt2 N2Assmt3
Name3 09-Nov-05 N3Assmt1 N3Assmt2 N3Assmt3
Name4 12-Nov-05 N4Assmt1 N4Assmt2 N4Assmt3
Name5 (blank) N5Assmt1 N5Assmt2 N5Assmt3
etc

Dates are in col B, with the due date entered in B1

Put in G2:
=IF(OR(B$1="",A2=""),"",IF(AND(B2="",B$1-TODAY()<45),ROW(),IF(B$1-B2<45,ROW(
),"")))

Copy G2 down to say G10
(cover max expected extent of data in col A)
Leave G1 empty

In Sheet2
----------
Put in A2:
=IF(ISERROR(SMALL(Sheet1!$G:$G,ROWS($A$1:A1))),"",
INDEX(Sheet1!A:A,MATCH(SMALL(Sheet1!$G:$G,ROWS($A$ 1:A1)),Sheet1!$G:$G,0)))

Copy A2 across to E2, fill down to E10
(cover the same extent as done in col G in Sheet1)
Format col B as date

Sheet2 will return the desired results neatly bunched at the top
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"cityfc" wrote in message
...
Hi please help
I have a database of names in Column A and columns for assessments.
So A1 - 2 has a name. B1 has a due date in. And there is a space for a

date
to be entered in B2 for when it was completed. This cell (b2) has 3
conditional formats to change the cell colour to yellow if a date has been
entered, goes purple if a date is not entered and is 45 days to due date

and
red if there are 15 days to go. What i want to do is to extract a name to
another worksheet when there has not been a date entered and is 45 days

till
the due date and also put the type of assessment

Please help its driving me bonkers!!!!!!!!!