Having Troubles Formatting Cells to Delete After 365 Days

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
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Try this:
=IF((TODAY()-D2)>365,"",D2)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top