View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
roy.okinawa
 
Posts: n/a
Default TEN OLDEST DATES

I have done the first step on the Overall sheet and get dates on cells in
column S that do not have Repair Clin, they are blank.

"Max" wrote:

One play, which also caters for the possibility of ties in the dates ..

In sheet: Overall
-----------
Use an empty col to the right, say, col T

Put in T2:
=IF(O2="","",IF(AND(B2<"Closed",S2<"Repair Clin"),
O2+ROW()/10^10,""))

Copy T2 down to say, T100,
to cover the max expected extent of data

(Leave T1 empty)

In sheet: Problem Areas
-----------
With headers placed in A1:B1 : PO#, Date Opened

Put in A2:
=IF(ISERROR(SMALL(Overall!$T:$T,ROWS($A$1:A1))),"" ,
INDEX(Overall!A:A,MATCH(
SMALL(Overall!$T:$T,ROWS($A$1:A1)),Overall!$T:$T,0 )))

Put in B2:
=IF(ISERROR(SMALL(Overall!$T:$T,ROWS($A$1:A1))),"" ,
INDEX(Overall!O:O,MATCH(
SMALL(Overall!$T:$T,ROWS($A$1:A1)),Overall!$T:$T,0 )))

Format B2 as date

Select A2:B2, copy down to B100
(cover the same extent as done in col T in "Overall")

Cols A & B will return the required data, with the lines sorted by dates in
ascending order in col B and all neatly bunched at the top.

POs with tied dates, if any, would be listed in the same relative order that
they appear in "Overall".

Just pick the data as required for the "10 oldest dates" appearing in col B
(may need to pick more than 10 lines if there are tied dates)

Adapt to suit ..
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"roy.okinawa" wrote in message
...
I need a formula on my "Problem Areas" sheet that will search and then

list
from my "Overall" sheet the ten oldest dates (column O), that have not

been
closed (column B), and do not match the text "Repair Clin" (column S).

Each
row of data begins with the purchase order# (column A).

On the "Problem Areas" sheet it will only list the PO# and Date Opened.