How to determine if a date falls between two dates or weekend in Excel?
Sometimes you may want to determine or check whether a date falls between two dates or weekend in Excel. This article will show you following tricky ways to check whether a date falls between two dates or weekend in Excel.
You may interest in:
Recommended Productivity Tools
Supposing you need to determine if the dates in Column A fall between 7/1/2008 and 12/31/2009. please do as follows:
1. In a blank cell, says Cell B2, enter formula =IF(AND(A2>$B$1,A2<$c$1),a2, FALSE) into the Formula Bar, and press the Enter key.
Note: This formula will check whether the date falls between 7/1/2008 and 12/31/2009. If the date falls in this period, it will return the date; if the date does not fall in this period, it will return the text of FALSE.
2. Keep selecting the result cell, drag the Fill Handle down to get all results. See screenshot:
Now you can identify whether a date falls within a specified date range or not.
With the Select Specific Cells utility of Kutools for Excel, you can easily find out the date falls between two dates and then select them immediately.
1. Select the range with dates you want to determine if they fall between two dates, and then click Kutools > Select > Select Specific Cells. See screenshot:
2. In the Select Specific Cells dialog box, select the Cell option in the Selection type section, and then specify the Greater than and Less than dates, and finally click the OK button.
You can see cells with dates which fall between two dates are selected immediately. See screenshot:
You can determine whether a date in Column A falls on weekends with following steps:
Method A: Using formula to check whether a date falls on a weekend.
1. In a blank cell, enter formula of =IF(OR(WEEKDAY(A2)=1,WEEKDAY(A2)=7),A2,FALSE) into the Formula Bar, says Cell B2, and press the Enter key.
This formula will identify whether a date falls on weekends or not. If the date falls on weekend, it will return the date; if the date does not fall on weekend, it will return the text of FALSE.
2. Keep selecting the result cell, then drag the Fill Handle down to get all results.
Method B: Using User-defined function to check whether a date falls on a weekend.
1. Press the ALT + F11 keys togetherto open the Microsoft Visual Basic for Applications window.
2. In the Microsoft Visual Basic for Applications window, click Insert >> Module, and paste the following macro into the Module Window.
Public Function IsWeekend(InputDate As Date) As Boolean Select Case Weekday(InputDate) Case vbSaturday, vbSunday IsWeekend = True Case Else IsWeekend = False End Select End Function
3. Press Alt + Q keys simultaneously to close the Microsoft Visual Basic for Applications window.
4. In a blank cell, enter formula =IsWeekend(A2) into the Formula Bar, and then press the Enter key.
If it returns the text of True, the date in Cell A2 is a weekend; and if it returns the text of False, the date in Cell A2 does not fall on a weekend.
Besides the above method, you can convert all dates to certain weekday with the Apply Date Format utility of Kutools for Excel, and then determine if a date falls on a weekend (the weekend days are Sunday and Saturday).
1. Select the date range, and then click Kutools > Format > Apply Date Formatting. See screenshot:
2. In the Apply Date Formatting dialog box, select Wednesday in the Date formatting box, and then click the OK button.
Now the selected dates are converted to weekdays immediately. You can determine if a date falls on a weekend or not directly based on its content. See screenshot:
1. The converted results worked directly in the original data;
2. This utility support Undo “Ctrl + Z”.
Kutools for Excel includes more than 120 handy Excel tools. Free to try with no limitation in 60 days. Download the free trial now!
Recommended Productivity Tools
Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.
Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!
200 New Features for Excel, Make Excel Much Easy and Powerful:
- Merge Cell/Rows/Columns without Losing Data.
- Combine and Consolidate Multiple Sheets and Workbooks.
- Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
- Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
- More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
To post as a guest, your comment is unpublished.· 10 months agoI want to find all projects that fall within today's date +30 days (Within a month) and have the Project Number displayed when in the range, if not in range keep blank
To post as a guest, your comment is unpublished.· 1 years agoi want to monitor the dates and set the the alert in my excel , example i want to set in my excel to find the difference days between the request date and deadline to order date and automatically compare this difference with the policy date if the difference is greater than policy date , excel consider not done with an alert color , and if the difference is less than the policy days , excel consider the done with alert color. thank you
To post as a guest, your comment is unpublished.· 1 years agoHello to all,
I have a requirement in excel i.e.
i want to generate dates if design actual date is delay for 2 days then for costing department date is increase by delay date.
design target actual complete costing target marketing target
05-04-2016 07-04-2016 09-04-2016 10-04-2016
in above design target date is 05/04/2016 but design task completed on 07-04-2016 so costing target date will be automatically calculated as per delay days.
To post as a guest, your comment is unpublished.· 1 years agoI am recording the SLA duration between dates
40 day SLA starting on day XXXX
I am looking for a formula to show if client holds for x number of days that comes off the SLA too
01 june 2016 + 40 days = 11 July 2016 but project finishes 15 July shows as 4 days overdue
01 June 2016 Start
15 July 2016 End date of project
client Held 7 Day
3 days before SLA
To post as a guest, your comment is unpublished.· 1 years agoI want to show a certain date in a cell from a date range which is between two dates.
eg: 01-05-2016 to 05-05-2016 may shown as in other cell as 01-05-2016 .
pls help me..