Week numbers and formula

nparsons75

Well-known Member
Joined
Sep 23, 2013
Messages
1,254
Office Version
  1. 2016
Hi, I have a table with for example 10 rows, in Col A is a name, In Col B is a formula which calculates the average of the next 52 columns. Each of the 52 columns represent a week of the year.

I would like to achieve a couple of things here. I would like a cell, maybe A1 to have the year, 2018. Based on this year, I need the row above each week number to show the month by looking at the week number below it.

Once I have this I then want to lookup and calculate the average of the values for each month.

Hope this makes some kind of sense as its difficult to explain...

Thanks in advance for any help.




JanJanJanJanJanFebFebFebFeb
NAME12345678910111213141516171819
name 1
name 2
name 3

<tbody>
</tbody>
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi,

A1 formula = DATE(YEAR(TODAY()),1,1) (Gives you the first of Jan for current date)
Don't forget to format the cell to custom = yyyy

the formula for the month is ( this will give you the Monday date for each week no)
=MAX(DATE(YEAR(TODAY()),1,1),DATE(YEAR(TODAY()),1,1)-WEEKDAY(DATE(YEAR(TODAY()),1,1),2)+((RIGHT(INDIRECT(ADDRESS(ROW()+1,COLUMN())),2)-1)*7+1))

now Don't forget to format month cells to custom = mmm

This gets your dates on the first row.

Regards
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,951
Messages
6,122,442
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top