Formula to see if a date was entered within 15 days

joeyrbbns

New Member
Joined
Dec 26, 2018
Messages
2
Trying to compare two dates and see if they occurred within 15 days of each other. What I have tried so far:

=if(I3>=15,"Yes","No") that was pointless

then I tried

=if(J3-I3>=15,"Yes","No") still not working


Here is a sample of the data:
12/26/2018 0:0012/26/2018 9:03
12/27/2018 0:0012/26/2018 8:15
12/28/2018 0:0012/26/2018 9:01
12/29/2018 0:00

<colgroup><col><col></colgroup><tbody>
</tbody>
Some dates are blank because actions have not been completed yet.

Thanks in advance

-JR
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Welcome to the Board!

=if(J3-I3>=15,"Yes","No") still not working
Assuming that J3 is always the later date, if you want within 15 days, it should be:
Code:
[COLOR=#333333]=if(J3-I3[/COLOR][COLOR=#ff0000][B]<=[/B][/COLOR][COLOR=#333333]15,"Yes","No")[/COLOR]
 
Upvote 0
If the issue is that some dates are not populated, then you can do this:
Code:
[COLOR=#333333]=IF(AND(J3>0,I3>0),IF(J3-I3[/COLOR][COLOR=#ff0000][B]<=[/B][/COLOR][COLOR=#333333]15,"Yes","No"),"")
[/COLOR]
which will only return "Yes/No" if both dates are populated (otherwise, returns nothing).

And if either date can be bigger, then you can use this variation:
Code:
=IF(AND(J3>0,I3>0),IF([COLOR=#ff0000][B]ABS([/B][/COLOR]J3-I3[COLOR=#ff0000][B])[/B][/COLOR]<=15,"Yes","No"),"")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,560
Messages
6,114,304
Members
448,564
Latest member
ED38

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