Excel: Use an IF Function with WEEKDAY

Excel is a powerful and versatile tool that can be used to make complex calculations and develop sophisticated solutions to a wide range of business problems. One of Excel’s most powerful features is the ability to use IF functions with the WEEKDAY function. This combination allows you to quickly and easily set up conditional formulas that can be used to automate tedious and time-consuming tasks. By leveraging the power of IF functions with WEEKDAY, you can automate complex calculations and quickly determine the most efficient way to solve problems. With this combination, you can save time and money while ensuring that your calculations are accurate and reliable.


You can use the following formulas to create an IF function combined with the WEEKDAY function in Excel:

Formula 1: Create IF Function to Check if Date is on Specific Day of Week

=IF(WEEKDAY(A2)=1, "Sunday", "Not Sunday")

This particular formula checks if the day of the week for the date in cell A2 is on Sunday and returns either “Sunday” or “Not Sunday” as a result.

Formula 2: Create IF Function to Check if Date is on Weekday or Weekend

=IF(AND(WEEKDAY(A2)>1, WEEKDAY(A2)<7), "Weekday", "Weekend")

This particular formula checks if the day of the week for the date in cell A2 is on a weekday (Monday-Friday) or weekend (Saturday-Sunday) and returns “Weekday” or “Weekend” as a reuslt.

The following examples show how to use each formula in practice with the following column of dates in Excel:

Example 1: Create IF Function to Check if Date is on Specific Day of Week

We can type the following formula into cell B2 to check if the date in cell A2 is on a Sunday:

=IF(WEEKDAY(A2)=1, "Sunday", "Not Sunday")

We can then click and drag this formula down to each remaining cell in column B:

Excel if WEEKDAY then formula

The formula returns either “Sunday” or “Not Sunday” to indicate if each date in column A is on a Sunday or not.

Note: The WEEKDAY function in Excel returns an integer value between 1 (Sunday) and 7 (Saturday) to indicate the day of the week.

If you would instead like to check if a date is on a different day of the week, simply change the 1 to a different value.

=IF(WEEKDAY(A2)=2, "Monday", "Not Monday")

Example 2: Create IF Function to Check if Date is on Weekday or Weekend

We can type the following formula into cell B2 to check if the date in cell A2 is on a weekday or a weekend:

=IF(AND(WEEKDAY(A2)>1, WEEKDAY(A2)<7), "Weekday", "Weekend")

We can then click and drag this formula down to each remaining cell in column B:

Excel check if date is weekday or weekend

The formula returns either “Weekend” or “Weekday” to indicate if each date in column A is on a weekday (Monday-Friday) or weekend (Saturday-Sunday).

Note: We used the AND function with the WEEKDAY function in Excel to check if a cell had a weekday integer value equal to 2, 3, 4, 5 or 6 to indicate that it was a weekday.


x