Probably the easiest way is just to piggy-back on the existing code, as below. Leave the EventLookup code unchanged, and use a new function to return the minimum (earliest date). For the other solution, the dynamic range solution, you can use an "IFERROR" statement within a cell. Come to think of it, an "IFERROR" statment would also work for the VBA solution, as in '=IFERROR(MIN(EVENTLOOKUP(DateRange, EventRange, "E"), EVENTLOOKUP(DateRange, EventRange, "P")), IFERROR(EVENTLOOKUP(DateRange, EventRange, "E"), EVENTLOOKUP(DateRange, EventRange, "P")))'. Cumbersome, yes, but it should work.
The code below should be easily modified to handle more than just E and P.
Bookmarks