Excel "IF" function w/ date in test cell

Solved/Closed
Mike in PA - Updated on May 28, 2018 at 09:12 AM
 salim - Apr 29, 2018 at 08:16 AM
Hello,

I am trying to use the IF function with a date in the logic test cell; If the logice test cell has a date then I want the word "DONE" to sho, if it doesn't then I want it to calculate the difference between two cells that are populated with dates. The formula that I have been trying to get to work is shown below...any thoughts are greatly appreciated!

=IF(E22="mmddyyyy","Done",D22-H22)

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Updated on Nov 29, 2018 at 05:16 PM
You should write something like this :

=IF(E22=DATE(2009,11,2),"done",D22-H22)
128
wow, great formula.
thanks
31
Thank you. It saved my job.
0
Thank you very much it saved lot of time
0
Thanks, U really help me out.
0
thanks help me too
0