DumbEngineer
New Member
- Joined
- Nov 1, 2017
- Messages
- 5
I've a column D (which I plan to hide later) either filled with a date or left blank. Then I want to have column E either display the date from Column D if the date is within one year or display nothing if the date is over one year old. The format I have right now in D2 is:
=IF(D2="","",IF((DATEVALUE(TEXT(TODAY(),"dd/mm/yyyy")))-(DATEVALUE(TEXT(D2,"dd/mm/yyyy")))<365,D2,""))
While this formula works for some dates, it does not work for all dates. For example, when I enter 8/27/2017 or 10/29/2017 in column D, I receive: #VALUE ! as the output in column E. However, if I enter in 9/2/2016 I get out 9/2/2016 and if I enter in 3/2/2015 I receive nothing as an output. I cannot figure out what I am doing wrong.
Thanks
=IF(D2="","",IF((DATEVALUE(TEXT(TODAY(),"dd/mm/yyyy")))-(DATEVALUE(TEXT(D2,"dd/mm/yyyy")))<365,D2,""))
While this formula works for some dates, it does not work for all dates. For example, when I enter 8/27/2017 or 10/29/2017 in column D, I receive: #VALUE ! as the output in column E. However, if I enter in 9/2/2016 I get out 9/2/2016 and if I enter in 3/2/2015 I receive nothing as an output. I cannot figure out what I am doing wrong.
Thanks