Excel WEEKDAY and WEEKNUM functions

You are currently viewing Excel WEEKDAY and WEEKNUM functions

Here, we will learn how to use the Excel date functions: WEEKDAY and WEEKNUM. Later, we will also learn how to create weekday abbreviation.

Excel WEEKDAY function

The Excel WEEKDAY function returns an integer between 1-7 representing the day of week for the given date. By default, WEEKDAY returns 1 for a Sunday date and 7 for Saturday. The formula in B4, copied down, is:

=WEEKDAY(A4)

Excel WEEKNUM function

The Excel WEEKNUM function returns an integer between 1-54 representing the week number of year for the given date. WEEKNUM returns 1 starting 1 January. By default, weeks start on Sunday. The formula in E4, copied down, is:

=WEEKNUM(D4)

Creating weekday abbreviation using WEEKDAY with CHOOSE

To create a weekday abbreviation, use the formula based on the WEEKDAY and CHOOSE functions.

The dataset (shown in the image) contains some dates in the "Date" header column. The goal is to find the week day from each date and create an abbreviation for each week day. The formula in B12, copied down, is:

=CHOOSE(WEEKDAY(A12),"S","M","T","W","T","F","S")

How this formula works

WEEKDAY finds the week day from the date 1-Jan-25, that is Wednesday and so returns 4. This number goes to the index_num argument of CHOOSE. Since the text "W" is at the fourth position in the list of abbreviations, CHOOSE returns "W" as the final output.

You have successfully learnt how to use the Excel date functions: WEEKDAY and WEEKNUM. You have also learnt how to create weekday abbreviation! I hope this post helped you.

Download Practice Workbook

Kunal

Hey, I am Kunal Aggarwal, the founder and author of Kunal Excel Tip based in New Delhi, India. I have completed my postgraduation from NIIT Limited, New Delhi in Excel course in 2019. Since then, I have been using and learning Microsoft Excel and started writing posts on the spreadsheet software here since March 2024.

Leave a Reply