Calculate the Average of n weeks

Tom0203

New Member
Joined
May 23, 2021
Messages
2
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I am trying to calculate the average pay per week to calculate the holiday pay. For me to do that I need TOTAL PAY FOR THE LAST 52 WEEKS / 52 = AVERAGE PAY PER WEEK.
This post (How do I continue to take the sum of the last 50 non-zero numbers?) is solving the first part of the calculation which return the total of last 52 weeks pay. I need help for second part of the calculation which is the number of weeks included in total calculation. This is because not all employees have 52 weeks pay.

I have uploaded an image

May thanks for your help
 

Attachments

  • Average paye calculation.jpg
    Average paye calculation.jpg
    68.8 KB · Views: 44

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Try using the same formula, changing the last reference E2:E160 in the formula to 1

In theory it could be as simple as using
Excel Formula:
=MIN(COUNT(E2:E160),52)
but there is not enough detail to be able to say for certain.
 
Upvote 0
Try using the same formula, changing the last reference E2:E160 in the formula to 1

In theory it could be as simple as using
Excel Formula:
=MIN(COUNT(E2:E160),52)
but there is not enough detail to be able to say for certain.
Many thanks. That for sure solve my issue.

Another change in this formula (How do I continue to take the sum of the last 50 non-zero numbers?) I need to make is to stop the formula to go as far as 104 weeks back (including unpaid weeks) to get the pay for last 52 weeks. The form I have has more than 104 weeks. Some weeks are paid some are unpaid.
 
Upvote 0
The obvious thing would appear to be limiting the formula to 104 rows (it is currently looking at 159 rows). As before, there is not enough detail in your post to provide a definite answer.

How do we know where the latest week is entered? Should we assume that the last entry in E2:E160 is current? Doing this could mean that you are looking back more than 104 weeks from the current date if the most recent weeks are unpaid.

Should we cross reference the pay period dates in the table? If so where are those dates? How do we know what the most recent pay date should be in order to establish if the most recent weeks have been unpaid?
 
Upvote 0

Forum statistics

Threads
1,214,982
Messages
6,122,575
Members
449,089
Latest member
Motoracer88

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