Sometimes you want to have the week number of a certain date in your spreadsheet. In Excel you can use the
If you want to get a function that does the same as
That’s it! This will output the weeknumber of the date in cell
If you want to learn more about the
WEEKNUM()
function for this purpose, however in Google Spreadsheets there is no such function built in.WEEKNUM()
in Google Spreadsheets, use the following trick (assuming cell A1
holds a valid date):WeekNum in Google Spreadsheets
=MID(TEXT(A1,"yyww"), 3, 2)
That’s it! This will output the weeknumber of the date in cell
A1
.If you want to learn more about the
MID()
you can check this article which explains