Excel Issue between dates (specific month)

richard1234567891011

Board Regular
Joined
Feb 21, 2018
Messages
91
Hi Guys,

I have an issue with a formula. I need an if between dates with in the middle August. Example: 12/06/2019 12/10/2019
If in the range there is august do something, otherwise something else.

I have no idea how to write it.

Thank you guys,

Have a nice weekend.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Assuming that your dates are in cells A1 and A2, and A2 is always after A1, this formula will return a "Yes" if any August date falls in the range, and a "No" if it does not.
Code:
=IF(AND(DATE(YEAR(A1),8,31)>=A1,DATE(YEAR(A1),8,1)<=A2),"Yes","No")
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

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