Reputation: 63
I have a list of employees in Google sheet with their work start and end dates. It looks like this (sample):
I need to generate a new list out of it, that will have employees, who were employed during a particular month, say February 2018.
In that case the list should look like:
How do I do that? Could you help with the formula?
Upvotes: 0
Views: 48
Reputation: 1
=FILTER(A2:A, B2:B <= DATE(2018, 2, 1),
IF(C2:C="", TODAY(), C2:C) >= EOMONTH(DATE(2018, 2, 1), 0))
if you want just L M
use (eg. to remove blanks from C):
=FILTER(A2:A, B2:B <= DATE(2018, 2, 1),
C2:C >= EOMONTH(DATE(2018, 2, 1), 0))
Upvotes: 0
Reputation: 862
=query(A1:C,"where B <= date '2018-02-28' and (date '2018-02-01' <= C or C is null)",1)
Upvotes: 1