We help IT Professionals succeed at work.

Add a condition to an Excel formula to include when date in one cell equals date in another cell

158 Views
Last Modified: 2018-02-02
Column AH = Date WO was completed
Column AI = Deadline date

My formula below indicates whether the WO was completed by the deadline or not:

=IFERROR(IF($AH2="","",IF($AH2<$AI2,"Yes","No")),"")

I need the above formula to be modified to include the additional condition below:

If AH2 = AI2, the result is also 'Yes' (the deadline was met)

Thanks!
Andrea
Comment
Watch Question

ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Andrea,

This was simple :)  just to add <=
=IFERROR(IF($AH2="","",IF($AH2<=$AI2,"Yes","No")),"")

Author

Commented:
Thanks for the quick response, Shums! For some reason, the results I'm getting are still showing the deadline isn't met if AH2 = AI2. It appears that column AH includes a date and time stamp, whereas column AI only includes the date. Is it possible for the formula to ignore the time stamp, and if so, do you think that would resolve the issue?
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Show me the format of both the columns
Managing Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
That did the trick! Thanks, Shums!
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Pleased to help Andrea!

Arana great formula

Author

Commented:
Hi Arana,

I'm sorry, but I had already closed the question before I saw your response, which also worked. Thanks very much!

Andrea
CERTIFIED EXPERT

Commented:
Nothing to be sorry about, glad it worked, it was in fact Shum's answer just adjusted for your comment about time stamp, all credit goes to him, just wanted to give you an alternate way to do it , as a future reference.
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Andrea,

Please request to re-open your question and split the points, Arana's solution is as helpful as mine.

Author

Commented:
Thanks, Shums, I'll follow up...

Andrea

Author

Commented:
Thanks very much, Kyle!

Author

Commented:
Thanks again to you both! And thanks, Shums, for arranging for the question to be reopened so I could share the points!

Cheers,
Andrea
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
You're Welcome Andrea! Glad we both were able to help you.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions