Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Weekday Formula: Filter Mon-Fri Easily

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The most efficient way to identify weekdays (Monday through Friday) in Excel is using the WEEKDAY function combined with a logical test. By default, WEEKDAY(date, 2) returns numbers 1 through 7, where 1 represents Monday and 7 represents Sunday. To filter for weekdays only, you check if the result is less than or equal to 5. This approach avoids complex nested IF statements and works seamlessly across all modern versions of Excel.

What You'll Need

  • A dataset containing valid dates in one column (e.g., Column A).
  • Microsoft Excel installed on your computer (any version from 2010 onwards supports these functions).
  • Basic understanding of cell references (e.g., A1, B1).

Step-by-Step

  1. Prepare Your Data: Ensure your dates are formatted correctly as "Date" rather than text. If they appear left-aligned or look like serial numbers, select the cells, right-click, choose "Format Cells," and select "Date."
  2. Select an Output Cell: Click on the cell adjacent to your first date entry where you want the weekday indicator to appear. For example, if your first date is in A2, click on B2.
  3. Enter the Basic Formula: Type the following formula into the cell: =IF(WEEKDAY(A2, 2)<=5, "Weekday", "Weekend"). Press Enter. This checks if the day number is 5 or lower (Mon-Fri). If true, it displays "Weekday"; otherwise, it displays "Weekend."
  4. Fill Down the Formula: Hover over the bottom-right corner of cell B2 until the cursor changes to a small black cross (the fill handle). Double-click the cross to automatically fill the formula down to match the length of your data in Column A, or drag it manually down the column.
  5. Verify Results: Check a few known weekend dates (Saturdays and Sundays) to ensure they return "Weekend" and that Monday through Friday return "Weekday."
  6. Optional - Return TRUE/FALSE: If you prefer a boolean value for filtering purposes, use this simpler formula instead: =WEEKDAY(A2, 2)<=5. This will return TRUE for weekdays and FALSE for weekends.

Common Mistakes

One frequent error is forgetting the second argument in the WEEKDAY function. Without specifying , 2, Excel defaults to returning 1 for Sunday and 7 for Saturday. In this default mode, checking for values <=5 would incorrectly include Sunday and exclude Friday. Always specify , 2 when targeting Monday as the start of the week.

Another common issue is treating dates as text. If your source data was imported from CSV or another system, dates might be stored as text strings (e.g., "2023-10-01"). The WEEKDAY function cannot process text. You must convert these to actual date serial numbers using the "Text to Columns" feature or by multiplying by 1.

Tips

If you need to count the total number of weekdays between two specific dates, do not use the basic WEEKDAY formula row-by-row. Instead, use the NETWORKDAYS function. For example, =NETWORKDAYS(StartDate, EndDate) calculates the inclusive number of working days between two dates, automatically excluding weekends.

For dynamic dashboards, consider using conditional formatting. Select your date column, go to Home > Conditional Formatting > New Rule. Choose "Use a formula to determine which cells to format" and enter =WEEKDAY($A2, 2)>5. Set the format to highlight weekends in red. This visually distinguishes non-working days without adding extra columns.

Remember that holidays are not automatically excluded by the WEEKDAY function. If your definition of "weekday" excludes public holidays, you must add a separate list of holiday dates and use the NETWORKDAYS function with the optional "holidays" argument, or nest additional logic in your IF statement.

Troubleshooting

If your formula returns #VALUE!, the cell reference points to empty space or text that isn't a date. Verify that the referenced cell contains a valid date format. Try typing a simple date like 1/1/2024 into a blank cell and referencing that to test if the formula syntax itself is correct.

If every cell returns "Weekend" or "Weekday" regardless of the input, check your formula's comparison operator. Ensure you are using <=5 for Monday-Friday. If you accidentally used >=6, you would be identifying Saturdays and Sundays. Also, verify that you did not omit the comma separating the date reference and the return type number in the WEEKDAY function.

In rare cases, locale settings may affect how Excel interprets date formats. If your dates are in DD/MM/YYYY format but Excel expects MM/DD/YYYY, the conversion might fail silently or produce incorrect results. Check your system's regional settings or force the date format using the DATEVALUE function if necessary, though fixing the source data format is usually more reliable.

Frequently Asked Questions

Can I use this formula for other languages?

The WEEKDAY function returns numbers, so it is language-independent. However, if you want to display the name of the day (e.g., "Monday"), you can combine it with the TEXT function: =TEXT(A2, "dddd"). Note that the output language depends on your Windows region settings.

How do I exclude public holidays?

The basic WEEKDAY formula does not know about holidays. To exclude them, maintain a separate range of holiday dates. Use the NETWORKDAYS.INTL function if you have Office 365 or Excel 2013+, which allows custom weekend definitions and holiday ranges. Alternatively, add a condition to your IF statement: =AND(WEEKDAY(A2,2)<=5, COUNTIF(HolidayRange, A2)=0).

Is there a difference between WEEKDAY(..., 2) and WEEKDAY(..., 1)?

Yes. WEEKDAY(date, 1) treats Sunday as 1 and Saturday as 7. WEEKDAY(date, 2) treats Monday as 1 and Sunday as 7. Using type 2 aligns with the standard business week, making the "less than or equal to 5" logic intuitive for Monday-Friday identification.

Can I filter directly without a helper column?

You can apply filters based on formulas if you create a helper column as described above. Excel's built-in AutoFilter does not allow direct filtering by calculated values unless those values exist in a cell. Therefore, creating a column with the "Weekday/Weekend" label is the standard method for filtering datasets.