Reputation: 1307
I'd like to match the date range label with specific dates.
I have a table with date range & label (in DateRange
sheet):
I'd like to apply the label to the qualifying dates and results as such:
How can this be achieved with Google Sheets formula?
Example sheet: https://docs.google.com/spreadsheets/d/1O1rZUstDNSXPdUVXvaDfPO4rAQs2cJWHimfGxbddtNU/edit#gid=858702648
Upvotes: 0
Views: 288
Reputation: 1
={"Name"; ARRAYFORMULA(IFERROR(IF(DATE(A2:A, B2:B, C2:C)<=MAX(DateRange!B:B),
IFERROR(VLOOKUP(DATE(A2:A, B2:B, C2:C), DateRange!A1:C, 3)), )))}
Upvotes: 1
Reputation: 59475
One way (adapted from Web Applications) is, in F2 and copied down to suit:
=query(DateRange!A:C,"select C where A<=date '"&Text(date(A2,B2,C2),"yyyy-MM-dd")&"' and B>=date '"&text(date(A2,B2,C2),"yyyy-MM-dd")&"' ",0)
Upvotes: 1