Need help comparing dates...

[Solved/Closed]
Report
Posts
2
Registration date
Monday July 28, 2014
Status
Member
Last seen
July 28, 2014
-
Posts
1944
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
October 26, 2021
-
I have dates in one column, I want to enter a $0 value in another column if that date is >= 5 years in the past. Obviously, I'm a relative newbie with Excel functions beyond very basic stuff.

2 replies

Posts
1944
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
October 26, 2021
145
l_gavacho, Good evening.

Try to use:
=IF(DATEDIF(A1,TODAY(),"Y")>=5,0,"")

Is it what you want?
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão
Posts
2
Registration date
Monday July 28, 2014
Status
Member
Last seen
July 28, 2014

Marcilio: Works like a charm, you are brilliant! Obrigado!
Posts
1944
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
October 26, 2021
145
You're welcome.
I'm glad to help you.
--
Belo Horizonte, Brasil.
Marcílio Lobão