View Single Post
  #3   Report Post  
Max
 
Posts: n/a
Default

Another option to try, using non-array formulas ...

Assume the user will enter the Start and End dates in Sheet1's A2:A3
(Start date in A2, End date in A3. If the query involves only a single
date, then the same date has to be entered in both A2 and A3)

In sheet: CH Milestones
------------------
Use an empty adjacent col, say col GN:

Put in GN5:
=IF(OR(Sheet1!$A$2="",Sheet1!$A$3="",GM5=""),"",IF (AND(GM5=Sheet1!$A$2,GM5<
=Sheet1!$A$3),ROW(),""))

Copy GN5 down to GN87

(Ensure GN1:GN4 are left empty)

Then in a new sheet, say Sheet2
---------
we could put in say, B2:

=IF(ISERROR(SMALL('CH Milestones'!$GN$5:$GN$87,ROWS($A$1:A1))),"",INDEX( 'CH
Milestones'!$GL$5:$GL$87,MATCH(SMALL('CH
Milestones'!$GN$5:$GN$87,ROWS($A$1:A1)),'CH Milestones'!$GN$5:$GN$87,0)))

and copy B2 down to B84
(cover the same range size as that done in GN5:GN87 in "CH Milestones")

B2:B84 will return the desired results for the inputs in Sheet1's A2:A3, all
neatly bunched at the top
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Kay" wrote in message
...
I want to automatically produce a list of all events that will occur

between
two given dates.

I am using VLOOKUP to search the column which has the date for each event.

I
want to return the names of all the events that occur before the

user-defined
dates.

My formula looks like this:

=IF('CH Milestones'!GM5<Sheet1!A$2,VLOOKUP('CH Milestones'!GM5,'CH
Milestones'!GL$5:GM$87,2,TRUE),"")

GM is the column with the dates.
GL is the column with the event names.
A2 has a user-defined date entered into it.

(In the above formula I was only looking for dates before A2; ultimately I
want only those between two dates.)

Many thanks...