user2697471
user2697471

Reputation: 1

Excel date formula - if between date x and date y

I have 3 date buckets.

  1. 21.01.2014 to 21.01.2017
  2. 22.01.2017 to 22.01.2022
  3. 23.01.2022 +

I have a list of dates and wish to have A formula that identifies which date bucket that date is and return the corresponding number 1,2 or 3. So 26.04.2019 would return a 2 as per above. Can anyone help me with this ?

Upvotes: 0

Views: 122

Answers (1)

Dmitry Pavliv
Dmitry Pavliv

Reputation: 35843

Try to use following formula:

=MATCH(TEXT(A1, "dd.mm.yyyy"),{"21.01.2014","22.01.2017","23.01.2022"},1)

or (depends on your local settings)

=MATCH(TEXT(A1, "dd.mm.yyyy"),{"21.01.2014";"22.01.2017";"23.01.2022"},1)

enter image description here

Upvotes: 2

Related Questions