+ Reply to Thread
Results 1 to 7 of 7

Count the last full weeks wages for the last 12 weeks only

  1. #1
    Registered User
    Join Date
    09-09-2012
    Location
    Dudley
    MS-Off Ver
    Excel 2003
    Posts
    33

    Count the last full weeks wages for the last 12 weeks only

    Hello, please find attached my worksheet, of which I am very proud.
    What I am looking for is in column L, to automatically add the last 12 weeks together where more than 38 hours have been worked. But only the last 12 times. This may not necessarily be the last 12 weeks however, as some weeks may not contain 38 or more hours.
    I just want column L to find the last 12 times I worked 38 hours or more from column D, and add the total for those weeks from column C.
    At the moment I am having to manually enter a formula every week into column L... Which will change most weeks depending on if I've worked 38 hours or not.
    So the formula in L54 would be manually entered as....

    =SUM(C53,C52,C51,C47,C44,C40,C39,C38,C32,C30,C27,C22)/12

    ...to get the average of the last 12 weeks I worked 38 hours or more.
    But this changes almost every week... Every year. I've been filling it in manually now for two years....

    I need it, as my holiday pay is paid as an average of the last 12 full weeks I worked including overtime, bonuses etc.
    Any help you can give is greatly appreciated. In pretty new to excel, so don't know about vba or tables. It's taken me a lot of time and study to do this worksheet, so please try and go gentle with me.
    Thank you.
    Mark
    Last edited by shorie7; 05-20-2016 at 04:38 AM.

  2. #2
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Count the last full weeks wages for the last 12 weeks only

    Hi
    Try this with a helper column X
    In X7 use the formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy down to X71

    In L20 use the formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy down.

    Note: I assume that are always 12 weeks where more than 38 hours have been worked.

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Count the last full weeks wages for the last 12 weeks only

    Hi
    I'm sorry. AGGREGATE is a Excel 2013 function. So, use in L20
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Count the last full weeks wages for the last 12 weeks only

    Try this array formula in L20, then drag down. No helper columns.
    Please Login or Register  to view this content.
    Pl see file
    To enter ARRAY formula
    Paste the formula
    Press F2
    Press Ctrl+Shift+Enter keys together.
    formula will be covered with{} brackets.

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count the last full weeks wages for the last 12 weeks only

    Quote Originally Posted by José Augusto View Post
    AGGREGATE is a Excel 2013 function.
    AGGREGATE was introduced in Excel 2010.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Registered User
    Join Date
    09-09-2012
    Location
    Dudley
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Count the last full weeks wages for the last 12 weeks only

    OMG thank you so so much! I have searched high and wide for this and you have cured a two year problem in less than a day!!! You have absolutely no idea how much time this is going to save me. I have tried it, and it appears to be working fine. I will let you know if I have any problems with regards to starting a new tax year.

    Can I also ask, can I save this as an original file, with NO information in it, but keeping ALL the formulas? If I delete the information, will it ruin the sheet?

    On the 9th September this year, I will need to start a fresh sheet, and delete all the old information. Will this delete the formulas also???
    I shall be keeping the information in rows 7-18 however, but will just copy and paste the last 12 full weeks prior to the 9th of September and put them into rows 7-18.

    I just don't want to be deleting a formula and have the sheet ruined now that I have found one working...

    Again thank you so much

  7. #7
    Registered User
    Join Date
    09-09-2012
    Location
    Dudley
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Count the last full weeks wages for the last 12 weeks only

    Would it be possible, seeing what this program can do, to copy the last 12 full weeks worked...(ie... The last 12 times I worked over 38 hours from page one), and have them automatically copied into page 2 of my workbook? Again, I am having to manually copy the 12 rows from page one, and paste them into page 2

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Count full weeks Monday thru Sunday between 2 dates
    By Tony Valko in forum Excel Formulas & Functions
    Replies: 32
    Last Post: 07-28-2014, 10:32 AM
  2. [SOLVED] Time axis as full weeks
    By pelachrum in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-08-2013, 07:55 AM
  3. Dividing monthly values into weeks automatically (some months have 5 weeks)
    By massimoo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-07-2012, 03:20 AM
  4. How to count full weeks
    By tillyb in forum Excel General
    Replies: 4
    Last Post: 11-06-2011, 08:12 PM
  5. difference between two dates in working weeks(5 day weeks)
    By AWilderbeast in forum Excel General
    Replies: 3
    Last Post: 08-31-2010, 09:21 AM
  6. Calculating Averages based upon weeks not include Bye Weeks
    By Kfetterman1 in forum Excel General
    Replies: 2
    Last Post: 09-27-2006, 11:18 AM
  7. Turn excel weeks into finacial weeks
    By dragonfly in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-20-2005, 10:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1