Comparing two dates with a twist

userpoets

New Member
Joined
Mar 21, 2019
Messages
8
Good afternoon!

We are trying to automatically show when two separate dates are greater than three days apart, or when there is not a second date with which to compare.

Example:

1690573693714.png


The first set of dates is GOOD because they are less than three days apart.
The third set of dates is BAD because they are more than three days apart.

The second set of dates is BAD but we are trying to get that to show a blank since there is no first date listed.

Our current formula reads like this:

=IF(($AB9-$AA9)>3,"BAD","GOOD!")

I've been experimenting with the "IFERROR" syntax but I'm not able to get it worked out. Any assistance is appreciated!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Try this:
Excel Formula:
=IF(OR($AA9="",$AB9="",$AB9-$AA9>3),"BAD","GOOD")
 
Upvote 0
It didn't work, it gave me the same results I was getting with my original formula. It feels like an "IFERROR" should work but since the blank cells aren't causing an error, it gets weird. Thanks for the quick reply, though!
 
Upvote 0
The formula works for me, as shown below:
1690578237412.png


Are the blank cells really blank, or is there a space or something else in there?
What does this formula return:
Excel Formula:
=LEN(AA10)
If it returns anything other than 0, your cell is not actually blank/empty.

Also, are your entries entered as valid dates or text?
What does this formula return?
Excel Formula:
=ISNUMBER(AA9)
If it returns FALSE, your entry is Text and not not a valid Date entry.
 
Upvote 0

Forum statistics

Threads
1,216,120
Messages
6,128,948
Members
449,480
Latest member
yesitisasport

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