How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (2024)

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (1)

Excel WEEKDAY Function: Syntax & Arguments

Syntax

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (2)

=WEEKDAY(serial_number, [return_type])

Return Values

0 to 7 (in numbers)

Arguments

ArgumentRequired/OptionalExplanation
serial_numberRequiredA number representing the day from which you want to find the day of the week
return_typeOptionalA number determining the return value type

Note:

  1. Dates are stored in Microsoft Excel as consecutive serial numbers, which allows them to be used in calculations. Dates should be inserted with the date format or using the DATE function. There may be problems if the dates are inserted in text format.
  2. Return_type is an argument in the WEEKDAY function which specifies the first day of the week. If you do not specify a return_type, the WEEKDAY function returns 1 for Sunday and 7 for Saturday by default. Return type 11-17 is introduced in the Excel 2010 version.
Return_typeFirst dayNumerical ResultStart-end
1 or omitted (default)Sunday1-7Sunday-Saturday
2Monday1-7Monday-Sunday
3Tuesday0-6 (since Monday = 0 in this case)Monday-Sunday
11Monday1-7Monday-Sunday
12Tuesday1-7Tuesday-Monday
14Thursday1-7Thursday-Wednesday
15Friday1-7Friday-Thursday
16Saturday1-7Saturday-Friday
17Sunday1-7Sunday-Saturday

Example 1 – Basic Examples of WEEKDAY Function

If the days are given in date format and do not need a return_type value, you may utilize the following formula in the D5 cell.

=WEEKDAY(C5)

Here, C5 is the Joining Date of Robert.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (3)

  • Press ENTER.
  • Use the Fill Handle by dragging down the cursor while holding it at the right-bottom corner of the D5 cell like this.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (4)

  • The outputs will look like this.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (5)

But if the return_type is 2 and 16 respectively for the same dataset, you may use the following formula in the D5 cell.

  • When the value of return_type is 2:

=WEEKDAY(C5,2)

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (6)

  • When the value of return_type is 16:

=WEEKDAY(C5,16)

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (7)

Example 2 – Using WEEKDAY Function with DATE Function

If joining date is given in serial number, you have to use the DATE where the YEAR, MONTH, and DAY functions to return the year, month, and day of the given date respectively.

  • Enter the following formula in D5

=WEEKDAY(DATE(YEAR(C5),MONTH(C5),DAY(C5)),12)

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (8)

  • Press ENTER.
  • Use the Fill Handle.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (9)

  • The following output is returned.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (10)

Example 3 – Using TEXT Function to Find Weekday Name

If you want to get the name of the day of the week that is found using the WEEKDAY function, you may use the TEXT function.

  • Enter the below formula in the D5 cell.

=TEXT(WEEKDAY(C5,2),"dddd")

  • Hit ENTER and then use the Fill Handle to return the results.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (11)

Example 4 – WEEKDAY Combined with CHOOSE Function

  • Enter the following formula in the D5 cell and then use the Fill Handle to get all the outputs.

=CHOOSE(WEEKDAY(C5),"Sun","Mon","Tue","Wed","Thu","Fri","Sat")

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (12)

Example 5 – Combined with SWITCH Function

  • Enter the below formula in the D5 cell.

=SWITCH(WEEKDAY(C5,1),1,"Sun",2,"Mon",3,"Tue",4,"Wed",5,"Thu",6,"Fri",7,"Sat")

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (13)

Example 6 – WEEKDAY Function to Get Weekdays and Weekends

Apply the following formula in cell D5.

=IF(WEEKDAY(C5,2)<6,"Workday","Weekend")

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (14)

Example 7 – WEEKDAY Function with Conditional Formatting

If you need to highlight the workday and weekend for better visualization, you may use the Conditional Formatting toolbar from the Styles command bar.

Steps:

  • Select the cells B5:D12.
  • Go to Home > choose Conditional Formatting > select New Rule.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (15)

  • A New Formatting Rule window will appear.
  • Choose Use a formula to determine which cells to format.
  • Enter the below formula in the formula box.

=WEEKDAY($C5,2)<6

  • Go to Format to select the color of the output.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (16)

  • Click OK.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (17)

  • In the New Formatting Rule, click OK.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (18)

  • Go to New Formatting Rule after selecting the cells. Enter the following formula.

=WEEKDAY($C5,2)>5

  • Go to Format.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (19)

  • Select any color in the Fill option, here the light blue color is selected.
  • Click OK.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (20)

  • Click OK in the New Formatting Rule

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (21)

  • The outputs will look like this.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (22)

Example 8 – Calculating Payment Including Weekends

In the sample dataset the number of working hours is given and you need to calculate the Payment for each employee and the total payment for all employees.
The formula will be entered in the E5 cell.

=IF(WEEKDAY(C5, 2)>5, D5*$H$6,D5*$H$7)

Use the SUM function for aggregating the individual payment.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (23)

Excel WORKDAY Function for Holidays

Excel’s WORKDAY function can be used to determine the work date that will occur a certain number of days after the start date.

The syntax of the WORKDAY function is.

=WORKDAY(Start_date,Days,Holidays)

The sample dataset has column headers for Starting Date, Production Days, and Completion Days.

It also has columns for Holidays and their corresponding Date.

In the Starting Date column are project start dates, in Column C there is the estimated time needed to complete those projects.

We need to return the Completion Date in Column D.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (24)

  • Enter the following formula in the D5 cell.

=WORKDAY(B5,C5,G5:G9)

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (25)

  • Press ENTER
  • Use the Fill Handle.
  • The outputs of project Completion Dates are returned.

How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (26)

Common Errors While Using WEEKDAY Function

  • #NUM – if the serial number is out of range for the current date’s base value – if the return_type is out of range from the return_type value table as shown in the arguments section.
  • #VALUE!– occurs when either the given serial_number or the given [return_type] is non-numeric.

Download Excel Workbook

Uses of WEEKDAY Function.xlsx

<< Go Back to Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
How to Use WEEKDAY Function in Excel (with 8 Examples) - ExcelDemy (2024)
Top Articles
MagicSeaWeed – Surf-Reports, Wetter- und Wellenvorhersagen weltweit
Surf Forecast verstehen: Alles was du wissen musst, um zur richtigen Zeit am richtigen Ort zu sein
SZA: Weinen und töten und alles dazwischen
Lengua With A Tilde Crossword
Play FETCH GAMES for Free!
Unit 30 Quiz: Idioms And Pronunciation
Devon Lannigan Obituary
Asian Feels Login
Comforting Nectar Bee Swarm
Fusion
Wild Smile Stapleton
Nordstrom Rack Glendale Photos
Lycoming County Docket Sheets
Skip The Games Norfolk Virginia
Capitulo 2B Answers Page 40
Assets | HIVO Support
Nebraska Furniture Tables
Diesel Mechanic Jobs Near Me Hiring
Otterbrook Goldens
What Happened To Anna Citron Lansky
Walgreens San Pedro And Hildebrand
CANNABIS ONLINE DISPENSARY Promo Code — $100 Off 2024
How pharmacies can help
Jet Ski Rental Conneaut Lake Pa
Catherine Christiane Cruz
BMW K1600GT (2017-on) Review | Speed, Specs & Prices
Cain Toyota Vehicles
Disputes over ESPN, Disney and DirecTV go to the heart of TV's existential problems
Weathervane Broken Monorail
27 Modern Dining Room Ideas You'll Want to Try ASAP
Gen 50 Kjv
Visit the UK as a Standard Visitor
Gesichtspflege & Gesichtscreme
031515 828
Missing 2023 Showtimes Near Grand Theatres - Bismarck
Half Inning In Which The Home Team Bats Crossword
Miss America Voy Board
Powerspec G512
Geology - Grand Canyon National Park (U.S. National Park Service)
The Thing About ‘Dateline’
Reese Witherspoon Wiki
Casamba Mobile Login
Stewartville Star Obituaries
8776725837
Big Reactors Best Coolant
Squalicum Family Medicine
Playboi Carti Heardle
60 Days From August 16
Arnold Swansinger Family
Best brow shaping and sculpting specialists near me in Toronto | Fresha
Phumikhmer 2022
Worlds Hardest Game Tyrone
Latest Posts
Article information

Author: Virgilio Hermann JD

Last Updated:

Views: 5987

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Virgilio Hermann JD

Birthday: 1997-12-21

Address: 6946 Schoen Cove, Sipesshire, MO 55944

Phone: +3763365785260

Job: Accounting Engineer

Hobby: Web surfing, Rafting, Dowsing, Stand-up comedy, Ghost hunting, Swimming, Amateur radio

Introduction: My name is Virgilio Hermann JD, I am a fine, gifted, beautiful, encouraging, kind, talented, zealous person who loves writing and wants to share my knowledge and understanding with you.