|
The collumn with range of dates needs to have just single dates in it. Use the first or last day of the period, but be consistent. That will allow you to use the dates in a formula.
I'd have to play with this to find the most elegant way to do it. But a nested program is probably the easiest. (I like writing formulas so I tend to go for that option.)
Using the last date of each period, you could simply do a nested formula that asks, is this date greater then that one, if not then is it greater then that one, if not then is it greater then that one? The formula would basically say, "nope, he left after that date, and after that date, and after that date, but before that date!" You can have a value tied to each date. He left before May 1st (meaning he left during the period immediately prior to May 1st) so use this value.
A lookup table would work too. But I find look-up tables are sometimes buggy when you are matching ranges rather than lists.
|