WEEKNUM formula examples
We have now seen the basic application of the WEEKNUM function in Excel. But that’s not it.
Let’s see some more practical examples of how you can apply the WEEKNUM function in Excel 📪
Example No. 1
Here’s the list of a company’s employees along with their date of leaving the company.
Each of these employees who worked with the Company for more than 36 weeks will get fringe benefits 💰
But how do we find those employees? Here’s how.
- Write the WEEKNUM function as follows.
= WEEKNUM (B2,
We want to find the number of weeks each employee has served since the start of the year. For that, we must find the week containing the date when each employee left.
So we have written the leaving date of each employee as the first argument of the WEEKNUM function.
- As the second argument of the WEEKNUM function, write the return_type 2.
= WEEKNUM (B2, 2)
Assuming that the official week of the Company starts from Monday, we have set the return_type to 2 (Monday) 🙈
- Press “Enter” to know the week number when the employee left.
- Drag and drop the same to the whole list.
And it was only that simple to get find when each employee left 🤩
So how many employees qualify for the fringe benefits? Let’s check out here:
- Write the COUNTIF function as follows:
The COUNTIF function counts the number of employees that served the company for more than 36 weeks.
- Press Enter.
Only one employee gets fringe benefits 🥇 We found that super easy, and what about you?
Example No. 2:
Here comes another example of how you may use the WEEKNUM function in Excel.
Below, we have a list of sales made by a Company on different dates.
We want to sum the sales made by the Company in the last week of the year.
The week of the Company here begins on Tuesday 📅
- For that, let’s write the WEEKNUM function as follows:
= WEEKNUM (A2,
As the first argument of the WEEKNUM function, we have added the date for which the week must be found.
- As the second argument, write in the return_type.
The week of the Company starts on Tuesday. Let’s find the return_type argument for Tuesday from the drop-down list here.
The relevant return_type argument here is 12 – write that in ✍
= WEEKNUM (A2, 12)
- Press Enter and drag down the same to the whole list.
Good enough! We know which sale was made in which week. Time to use the SUMIF function to sum the same.
- Write the SUMIF function as follows:
= SUMIF (B2:B5, “>=52”)
This tells Excel to sum up the sales in Column B that fall in Week 52 or later (the last week of the year).
- Press Enter to get the results as follows: