Excel Tutorial
Excel tutorials, quizzes & AI guides — all levels
RSS
  • Online Excel Exercises
  • Training
  • Excel Tests
  • Sitemap
  • Premium Quizzes
  • Shop
  • My account

The WEEKDAY function – Secrets and Errors

Date
Reading time: 2 minutes
Views: 3,709

The WEEKDAY function is an important function when you work with a calendar, or when you build a calendar.

  1. The WEEKDAY function returns a value representing the day of the week, ranging from 1 to 7 (or alternatively, 0 to 6)
  2. Add localization argument. According to your country, you must consider the value of the second argument of the WEEKDAY function.

=WEEKDAY(Date,Localization)

How to use the WEEKDAY function

The WEEKDAY function operates with minimal arguments, just a date

=WEEKDAY(A1)

Result returns by WEEKDAY function with only one argument

Yet the returned result may pose confusion 🤔😕

The 13/11/2023 is a Monday and the function returns 2; WHY? 😮 The WEEKDAY function, developed by Microsoft, follows the U.S. convention where the week starts on Sunday, making Monday the second day of the week.

This is why, if you don’t use the same US convention for the first day of the week, the results of the WEEKDAY function can insert errors in your report.

Explanation of the second argument

The second argument is optional, but it’s particularly useful if you’re outside the USA or Canada. While Monday is the default first day of the week in most countries, specifying this argument ensures that your calendar settings are accurate and tailored to your region.

You can set values for the second argument as follows:

  • 1 – The week starts on Sunday (value 1) and finishes on Monday (value 7). It’s the default value (or empty)
  • 2 – The week starts on Monday (1) and finishes on Sunday (7). The result expected by most countries in the word
  • 3 – The week starts on Sunday (0) and finishes on Monday (6)

The screenshot displays the different results returned for the same date according to the value of the second argument.

WEEKDAY return different result for Monday

According to your country’s convention, you must check the value to set for the second argument.

Other Values for the second argument

You have certainly noticed other values for the second argument of the WEEKDAY function

Other values for the weekday function

Remarks! Even after 25 years as an Excel developer, I have never seen a workbook using these values. Only the values 1 or 2 for the second argument are really used.

Related Articles

This function is very, very, VERY useful for creating a logical test, with the IF function or for conditional formatting.

  • Find Weekends or weekdays in Excel
  • Change the Color of Weekends in Excel
  • Formulas for calculating the days of the week
  • How to Calculate the Week Number in Excel?

Frédéric LE GUEN

day in Excel, fix errors, WEEKDAY

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Most Viewed Posts

  • Displaying Negative Numbers in Parentheses in Excel (310,065)
  • Top 10 Excel Functions You Must Know (232,001)
  • How to make automatic calendar in Excel (212,775)
  • Dash for a zero in Excel automatically (190,812)
  • Converting a Date from YYYYMMDD to DD/MM/YYYY in Excel (171,033)
image excel exercises
Excel Exercises
image excel quizzes
Excel Quizzes

The WEEKDAY function – Secrets and Errors

Reading time: 2 minutes
Views: 3,709

The WEEKDAY function is an important function when you work with a calendar, or when you build a calendar.

  1. The WEEKDAY function returns a value representing the day of the week, ranging from 1 to 7 (or alternatively, 0 to 6)
  2. Add localization argument. According to your country, you must consider the value of the second argument of the WEEKDAY function.

=WEEKDAY(Date,Localization)

How to use the WEEKDAY function

The WEEKDAY function operates with minimal arguments, just a date

=WEEKDAY(A1)

Result returns by WEEKDAY function with only one argument

Yet the returned result may pose confusion 🤔😕

The 13/11/2023 is a Monday and the function returns 2; WHY? 😮 The WEEKDAY function, developed by Microsoft, follows the U.S. convention where the week starts on Sunday, making Monday the second day of the week.

This is why, if you don’t use the same US convention for the first day of the week, the results of the WEEKDAY function can insert errors in your report.

Explanation of the second argument

The second argument is optional, but it’s particularly useful if you’re outside the USA or Canada. While Monday is the default first day of the week in most countries, specifying this argument ensures that your calendar settings are accurate and tailored to your region.

You can set values for the second argument as follows:

  • 1 – The week starts on Sunday (value 1) and finishes on Monday (value 7). It’s the default value (or empty)
  • 2 – The week starts on Monday (1) and finishes on Sunday (7). The result expected by most countries in the word
  • 3 – The week starts on Sunday (0) and finishes on Monday (6)

The screenshot displays the different results returned for the same date according to the value of the second argument.

WEEKDAY return different result for Monday

According to your country’s convention, you must check the value to set for the second argument.

Other Values for the second argument

You have certainly noticed other values for the second argument of the WEEKDAY function

Other values for the weekday function

Remarks! Even after 25 years as an Excel developer, I have never seen a workbook using these values. Only the values 1 or 2 for the second argument are really used.

Related Articles

This function is very, very, VERY useful for creating a logical test, with the IF function or for conditional formatting.

  • Find Weekends or weekdays in Excel
  • Change the Color of Weekends in Excel
  • Formulas for calculating the days of the week
  • How to Calculate the Week Number in Excel?
Tags: day in Excelfix errorsWEEKDAY

Frédéric LE GUEN

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Contact us
About me 
Privacy Policy

© 2022 – 2026 – excel-tutorial.com. All Rights Reserved.
Excel Tutorial is managed by majordome du net

Contact us
About me 
Privacy Policy

© 2022 – 2026 – excel-tutorial.com. All Rights Reserved.
Excel Tutorial is managed by majordome du net