EXCEL FUNCTIONS-WEEKDAY

INTRODUCTION

WEEKDAY FUNCTION comes under the DATE AND TIME FUNCTIONS CATEGORY of functions in Excel.

WEEKDAY FUNCTION simply returns the DAY NUMBER of any date in a week.

This function is very simple but helpful in solving many tricky problems concerned with the date and time in Excel.

It is helpful if we need to find out the Week start date or Week end date or put any condition for the particular days of the week etc.

In this article we would learn about the purpose, formula, syntax and examples about the WEEKDAY function in Excel.

PURPOSE OF WEEKDAY FUNCTION IN EXCEL

WEEKDAY FUNCTION returns the DAY of the Week for a given date by the integers from 1 to 7.

For example 1 for Sunday, 2 for Monday and so on.

PREREQUISITES TO LEARN WEEKDAY FUNCTION

THERE ARE A FEW PREREQUISITES WHICH WILL ENABLE YOU TO UNDERSTAND THIS FUNCTION IN A BETTER WAY.

  •  Basic understanding of how to use a formula or function.
  •  Basic understanding of rows and columns in Excel.
  • If we know the way Excel handles the DATES, the function becomes a bit easier to learn.
  •  Of course, Excel software.

Helpful links for the prerequisites mentioned above

What Excel does? How to use formula in Excel?

SYNTAX: WEEKDAY FUNCTION IN EXCEL

The Syntax for the WEEKDAY function in Excel is

=WEEKDAY(DATE SERIAL NUMBER, CODE FOR RETURN TYPE)
DATE SERIAL NUMBER is the serial number of the Date or the Date itself for which the day is needed to be found.CODE FOR RETURN TYPE is the code which will decide the day to be counted as 1 as the week is taken from the different days in different parts of the world.

CODE FOR RETURN TYPECODE RETURNED
1 or omittedNumbers 1 (Sunday) through 7 (Saturday). Behaves like previous versions of Microsoft Excel.
2Numbers 1 (Monday) through 7 (Sunday).
3Numbers 0 (Monday) through 6 (Sunday).
11Numbers 1 (Monday) through 7 (Sunday).
12Numbers 1 (Tuesday) through 7 (Monday).
13Numbers 1 (Wednesday) through 7 (Tuesday).
14Numbers 1 (Thursday) through 7 (Wednesday).
15Numbers 1 (Friday) through 7 (Thursday).
16Numbers 1 (Saturday) through 7 (Friday).
17Numbers 1 (Sunday) through 7 (Saturday).

EXAMPLE:WEEKDAY FUNCTION IN EXCEL

DATA SAMPLE

For the sake of understanding, let us find out the day number of different dates with different codes.

 DATEWEEK STARTING DAY
EXAMPLE 102-07-2020SUNDAY
EXAMPLE 208-08-2019MONDAY
EXAMPLE 312-03-2010TUESDAY
EXAMPLE 403-12-2015WEDNESDAY
EXAMPLE 510-05-2013THURSDAY
EXAMPLE 607-05-2013FRIDAY
EXAMPLE 705-10-2016SATURDAY
EXAMPLE 816-10-2019MONDAY
EXAMPLE 916-05-2013TUESDAY
EXAMPLE 1020-02-2011WEDNESDAY
WEEKDAY FUNCTION EXAMPLES

STEPS TO USE WEEKDAY FUNCTION

Following table gives the description of the formula usage.

The Result is the output which tells the DAY NUMBER of the week on the given date. The formula used is the formula we used to find out the weekday.

The general steps are

  • Select the cell where we want to find out the result.
  • Put the given formula.
  • The general format of the function is
  • =WEEKDAY(ADDRESS OF THE DATE, MODE FROM THE ABOVE TABLE).

The result and the formula used for individual examples are given in the table below.

 DATEWEEK STARTING DAYRESULT(WEEKDAY)FORMULA USED
EXAMPLE 102-07-2020SUNDAY4=WEEKDAY(Q9,11)
EXAMPLE 208-08-2019MONDAY3=WEEKDAY(Q10,12)
EXAMPLE 312-03-2010TUESDAY3=WEEKDAY(Q11,13)
EXAMPLE 403-12-2015WEDNESDAY1=WEEKDAY(Q12,14)
EXAMPLE 510-05-2013THURSDAY1=WEEKDAY(Q13,15)
EXAMPLE 607-05-2013FRIDAY4=WEEKDAY(Q14,16)
EXAMPLE 705-10-2016SATURDAY4=WEEKDAY(Q15,17)
EXAMPLE 816-10-2019MONDAY2=WEEKDAY(Q16,12)
EXAMPLE 916-05-2013TUESDAY2=WEEKDAY(Q17,13)
EXAMPLE 1020-02-2011WEDNESDAY4=WEEKDAY(Q18,14)