Looking up a value, depending on which set of dates another date falls between

Posted by Ruffles on Super User See other posts from Super User or by Ruffles
Published on 2010-05-27T13:04:31Z Indexed on 2010/05/27 13:12 UTC
Read the original article Hit count: 192

Filed under:

Hello, and apologies if this is a duplicate - if you could point me in the direction of any existing answers, that would be great.

I have a set of date ranges in Excel, each of which has some kind of label. e.g.

LabelA  01/01/10  31/01/10
LabelB  01/02/10  28/02/10
LabelC  01/03/10  31/03/10

If I have another date, I would like to look up the label relating to the date range within which this date falls. e.g. For 15/02/10 I would like to return LabelB. I know that the date ranges will not overlap, although there could be a gap between the end date of one, and the start date of the next.

© Super User or respective owner

Related posts about excel