excel if then statement

0

I am trying to create a spreadsheet that will say what year a student must exit school. A student with disabilities must exit by the spring of the school year that they turn 21. So I want a calculation to add one year if they turn 21 between August 25th and December 31st of any given year. Or return the same year if they turn 21 in January through June 8th of any given year.

I might be complicating this too much so feel free to give alternate suggestions.

bythepond

Posted 2017-02-15T15:17:06.463

Reputation: 1

Answers

1

Assuming A1 cell contains student's birth date, here is the formula:

=YEAR(A1) + IF(OR(AND(MONTH(A1) = 8; DAY(A1) >= 25); MONTH(A1) > 8); 22; 21)

Some caveats:

  1. It is not clear from your question what the formula must return for birth dates between June 8th and August 25th. I suppose it's just a typo that this date interval is remain undefined and it should be included either in date interval to add one year or in date interval to not add. So, for certainty I add one year if birth date is between August 25th and December 31st and don't add otherwise.
  2. I'm using Russian version of Excel and all function names are in Russian here. I translated them manually to English. But I have no chance to check it in English version. So, I can't guarantee that my formula is 100% working but I hope it is.

P.S. If this formula won't work for you feel free to comment on my answer and I'll try to correct it.

dmitry.hohlov

Posted 2017-02-15T15:17:06.463

Reputation: 21

Thank you! Sorry for not explaining myself well. birthdate year they turn 21 must exit by spring of a 10/17/98 10/17/2019 b 1/23/00 1/23/2021 c 8/25/2000 8/25/2021 d 8/15/2000 8/15/2021 – bythepond – 2017-02-15T17:16:35.913

Thank you! Dimitry and @LPChip Sorry for not explaining myself well. I can't seem to paste my spreadsheet. So Sue must exit by spring of 2020, Jake 2021, Ann 2022, Doug 2021
birthdate year they turn 21 must exit by spring of Sue 10/17/98 10/17/2019 Jake 1/23/00 1/23/2021 Ann 8/25/2000 8/25/2021 Doug 8/15/2000 8/15/2021
– bythepond – 2017-02-15T17:27:34.223

@bythepond I'm not sure that I understand your comment quite well. Especially did my formula works for you or not? I've checked all your examples and get right exit years with my formula (in Russian Exel with Russian function names). And as I can understand my assumption #1 is right. As for translation of function names I'm pretty sure it is correct. So the formula should work for you, did it? – dmitry.hohlov – 2017-02-19T10:48:30.753