Multiple if and functoions

Closed
Cato - 7 Aug 2015 à 18:21
Mazzaropi Posts 1983 Registration date Monday 16 August 2010 Status Contributor Last seen 24 May 2023 - 7 Aug 2015 à 19:12
Hello,
I'm trying to write a function for a cell which refers to a date in another cell - which if it is between 01/01/1994 and 31/12/1995 the cell will read cellB2, but if the date is between 01/01/1996 and 31/12/1997 it will read Cell B3
Thanks for any help.


1 response

Mazzaropi Posts 1983 Registration date Monday 16 August 2010 Status Contributor Last seen 24 May 2023 147
7 Aug 2015 à 19:12
Cato, Good evening.

Suppose your another cell is C1

Try to use:

=IF(AND(C1>=DATE(1994,1,1),C1<=DATE(1995,12,31)),B2,IF(AND(C1>=DATE(1996,1,1),C1<=DATE(1997,12,31)),B3,""))


Is that what you're looking for?
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão