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.

Determine if a date falls between two dates in Excel

Determine if a date falls on a weekend in Excel

Kutools for Excel: add 120 new features in Excel. Save one hour every day.
Classic Menu for Office: brings back classic menus to Office 2010 and 2013 (includes Office 365).
Office Tab: brings tabbed interface to Office as the use of web browser Chrome, Firefox and Internet Explorer.

An example may be easily to understand. We will show you how to determine if the dates in Column A fall between 7/1/2008 and 12/31/2009, and check whether they fall on a weekend too.


arrow blue right bubbleDetermine if a date falls between two dates in Excel

Hot
Amazing! Using Tabs in Excel like Firefox, Chrome, Internet Explore 10!

For example, you need to determine expenses occurred on specific dates whether falls on project duration from 7/1/2008 to 13/31/2009. And you can get the answer with following steps:

Step 1: In the blank cell, says Cell B2, enter the formula of =IF(AND(A2>$B$1,A2<$c$1),a2, FALSE), and press the Enter key.

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 falls in this period, it will return the text of FALSE.

Step 2: Select the Range of B2:B18, and click the Home >> Fill >> Down to copy this formula to this column.

Now you can identify whether a date falls within range or not.


arrow blue right bubbleDetermine if a date falls on a weekend in Excel

You can determine whether a date in Column A falls on weekends with following steps:

blue-dotMethod A: Using functions to check whether a date falls on a weekend.

Step 1: In a blank cell, enter formula of =IF(OR(WEEKDAY(A2)=1,WEEKDAY(A2)=7),A2,FALSE) in a blank cell, 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 weekends, it will returns the date; if the date does not fall on weekends, it will returns the text of FALSE.

Step 2: Select the range of B2: B18, and paste the formula to each cell in the selected range with clicking Home >> Fill >> Down.

blue-dotMethod B: Using VBA to check whether a date falls on a weekend.

Step 1: Hold down the ALT + F11 keys, and it opens the Microsoft Visual Basic for Applications window.

Step 2: Click Insert >> Module, and paste the following macro in 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

Step 3: In a blank cell, enter the formula of =IsWeekend(A2), and press the Enter key.

If it returns the text of True, the date in Cell A2 is a weekend; if it returns the text of False, the date in Cell A2 does not falls on a weekend.


Kutools for Excel

More than 120 Advanced Functions for Excel 2013, 2010, 2007 and Office 365.

screen shot

btn read more     btn download     btn purchase

Comments  

0#Lily2013-12-12 04:29
I'm tryin to see if cell L8 contains a specific date if it doesn then there is one of two values I want it to give me; if it doesn't contact neither of the dates then bring back the valude from a totally different cell.
For example. I'm in an empty cell i.e. W8 and want to look at cell L8 which contains a date and if it equals 12/14/2013 then I want it to return the value of 26, however if the date in cell L8 equals 12/28/2013 then it to return the value of 25 if cell L8 has any other date than the above then I want it to return the value from cell V8. How would I write this???
Reply | Reply with quote | Quote
0#Lily2013-12-12 04:34
I want to do the following:

I'm in cell w8 which is a empty cell

Cell L8 contains a date

if cell L8 equals 12/14/2013 I want it to return the value of 26 however if it contains the date 12/28/2013 ; if cell L8 doesn't contain either date then I want it to go to cell V8 and give me that cell value.

How would I create the formula?
Reply | Reply with quote | Quote
0#Paolo2014-05-19 01:26
Hi, very helpful info. Im trying to do a range date let me give you the example if payment is made between " Jan. 1-16 the answer should be 7th of the following month and if payment falls Jan. 17-31 excel should be able to answer 21st of the following month. how could i create this kind of fomula
Reply | Reply with quote | Quote

Add comment


Security code
Refresh