Forum Discussion

DanielAtGSU's avatar
DanielAtGSU
Copper Contributor
Apr 25, 2022
Solved

Help: IF Statement for Multiple Date Ranges

I have a column of dates (A) and a blank column (B) that I'm looking to populate with specific text based on the date in A. For example, if the date in A1 falls between (>=) 8/28/17 and (<) 8/27/18, populate B1 with "2017-18" and so on.

 

When I apply the formula below, I only get the FALSE (currently "Other")  result. What am I missing here?

 

=IF(AND(C2>=8/28/17,C2<8/27/18),"2017-18",IF(AND(C2>=8/27/18,C2<8/26/19),"2018-19",IF(AND(C2>=8/26/19,C2<8/24/20),"2019-20",IF(AND(C2>=8/24/20,C2<8/23/21),"2020-21",IF(AND(C2>=8/23/21,C2<8/22/22),"2021-22","Other")))))

  • DanielAtGSU 

    Excel treats 8/28/17 as a calculation: 8 divided by 28 divided by 17.

    Replace 8/28/17 with DATE(2017,8,28) and similarly for the other dates in your formula.

2 Replies

  • DanielAtGSU 

    Excel treats 8/28/17 as a calculation: 8 divided by 28 divided by 17.

    Replace 8/28/17 with DATE(2017,8,28) and similarly for the other dates in your formula.

Resources