+ Reply to Thread
Results 1 to 13 of 13

Function for finding weekly average hours based on date

  1. #1
    Registered User
    Join Date
    05-14-2013
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Function for finding weekly average hours based on date

    I have the following sheet that I use to maintain maintenance data. I have an "Average weekly hours" column and I would like to write a formula to calculate the "Average weekly hours" based on the "Last PM date" and "Running Hours". The data is used to know how much our machines are running and when maintenance will be due on this equipment. "Last PM date" is the last time the equipment was serviced and the "Running Hours" are the hours that it has been running since the last service. I would like to put in a formula so I don't have to manually do it for each unit of equipment.

    Ex:

    Unit # Last PM Date Last PM hours Last PM type Wkly hours date Running hours Avg Wkly hours

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Function for finding weekly average hours based on date

    how about an pivot table?
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    12-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    232

    Re: Function for finding weekly average hours based on date

    How about an example sheet?

  4. #4
    Registered User
    Join Date
    05-14-2013
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Function for finding weekly average hours based on date

    I have attached a spreadsheet to show you what I mean.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Function for finding weekly average hours based on date

    Please also add the expected result in your sheet.

  6. #6
    Registered User
    Join Date
    05-14-2013
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Function for finding weekly average hours based on date

    So essentially I would like the formula to read the "Last PM date" calculate how many weeks it has been since that date and then divide the "running hours" by the number of weeks that have passed.
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Function for finding weekly average hours based on date

    I only get the same answer on the first option.

    See if this is what you expected.

    The answers are in the green cells.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-14-2013
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Function for finding weekly average hours based on date

    Thank you for getting back to me so promptly. Each row represents a different piece of equipment. I am not sure why in the formula you would do J2-J3 because each "Last PM date" needs to be compared to the present date. So for unit #1906 it would be correct that it was serviced 14 weeks ago. For unit #1907 the weeks should have been roughly 16 weeks, because the date for that unit, 1/24/13 was 16 weeks ago. Unit #1908 would have been roughly 20 weeks. Unit #1909 would have been roughly 46 weeks since it is almost a full year since the last service.

    So with that being said, a formula that would calculate the amount of weeks that have passed from the "last service date" to the current date and then divide the "running hours" by the weeks that have passed is what I would want.

    I hope that is a little clearer now. It isn't always the easiest to describe all of this via email. Please let me know if you have any more questions. I really appreciate your help. Thank you.

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Function for finding weekly average hours based on date

    And how can I know 1907 is 17 weeks?

    There are no other dates from 1907 in your file.

    To which cells should I compare the date.

    So, if there is more data in your file, just show me.

    If there is not more data in your file, just add an new example in which those data are added.

    Then it's possible to come to a solution.

  10. #10
    Forum Contributor
    Join Date
    12-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    232

    Re: Function for finding weekly average hours based on date

    Hi PSA619,
    Off subject what does the PSA stand for?

    ok your issuse, in your example does this work?
    H2
    Please Login or Register  to view this content.
    I2
    Please Login or Register  to view this content.
    Drag both rows down.

  11. #11
    Registered User
    Join Date
    05-14-2013
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Function for finding weekly average hours based on date

    Nemo74,

    Thank you that is great. PSA was my old job acronym. Doesn't mean anything special. Thank you for that function. I was basing all the weeks off the current day and last PM day so everyday it would change. So the today function was perfect.

  12. #12
    Forum Contributor
    Join Date
    12-11-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    232

    Re: Function for finding weekly average hours based on date

    What does the acronym stand for? Proffesonal service administrator?

    Anyway if your issue is taken care of, please don't forget to mark your thread as solved.

    Also if you like, feel free to give some rep buy clicking the * under ther persons name who helped you.


    Have a super day!

  13. #13
    Registered User
    Join Date
    05-14-2013
    Location
    Sacramento, CA
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Function for finding weekly average hours based on date

    PSA stands for Provider Services Analyst. Thanks again for your help! You have a good day too.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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