How to Use the WEEKDAY Function in Excel

Below is a detailed guide on how to use the WEEKDAY function in Microsoft Excel and Google Sheets.

Introduction

The WEEKDAY function is designed to determine the day of the week corresponding to a specific date, returning a numerical value ranging from 1 to 7. By default, this function considers Sunday as the first day of the week (1).

Syntax

The syntax for the WEEKDAY function is as follows:

WEEKDAY(serial_number, [return_type])
  • serial_number: This required parameter represents the date you wish to analyze.
  • return_type: This optional parameter allows you to choose the numbering system for the weekday. If this parameter is omitted, the function defaults to 1 where Sunday is denoted as 1.

Examples

Here are some practical examples of using the WEEKDAY function in Excel and Google Sheets:

Example 1: Basic Usage

Consider a scenario where cell A1 contains the date “10/15/2022.” To find the day of the week for this date, use the formula:

Date Formula Result
10/15/2022 =WEEKDAY(A1) 7 (with the assumption that Sunday is the first day of the week)

Example 2: Specifying Return Type

If you prefer Monday as the first day of the week, you can change the return type to 2, which makes Monday 1 and Sunday 7:

Date Formula Result
10/15/2022 =WEEKDAY(A1, 2) 6 (with Monday as the first day of the week)

This adjustment allows you to tailor the return system to fit your specific needs.

Conclusion

The WEEKDAY function is an invaluable tool for determining the weekday of a given date in Excel and Google Sheets. By mastering its syntax and exploring these examples, you can effectively apply this function in your spreadsheets for tasks that require day-of-the-week data.

More information: https://support.microsoft.com/en-us/office/weekday-function-60e44483-2ed1-439f-8bd0-e404c190949a

Other functions
Returns the serial number of a particular date
Calculates the number of days, months, or years between two dates This function is useful in formulas where you need to calculate an age
Converts a date in the form of text to a serial number
Converts a serial number to a day of the month
Returns the number of days between two dates
Calculates the number of days between two dates based on a 360-day year
Returns the serial number of the date that is the indicated number of months before or after the start date
Returns the serial number of the last day of the month before or after a specified number of months
Converts a serial number to an hour
Returns the number of the ISO week number of the year for a given date
Converts a serial number to a minute
Converts a serial number to a month
Returns the number of whole workdays between two dates
Returns the number of whole workdays between two dates using parameters to indicate which and how many days are weekend days
Returns the serial number of the current date and time
Converts a serial number to a second
Returns the serial number of a particular time
Converts a time in the form of text to a serial number
Returns the serial number of today's date
Converts a serial number to a number representing where the week falls numerically with a year
Returns the serial number of the date before or after a specified number of workdays
Returns the serial number of the date before or after a specified number of workdays using parameters to indicate which and how many days are weekend days
Converts a serial number to a year
Returns the year fraction representing the number of whole days between start_date and end_date