+ Reply to Thread
Results 1 to 8 of 8

Formula for average duration for each month based on the ending month

  1. #1
    Registered User
    Join Date
    01-20-2005
    Posts
    22

    Formula for average duration for each month based on the ending month

    Hello Everyone,

    The help provided so far has been much appreciated.

    Now I need to add a feature.
    Here's the file.
    monthly avg of duration.xlsx

    The data consists of a START date and END date.
    Column C is END date minus START date, or, the DURATION of the event (in days).

    I need to list the average duration for each month based on the ending month.
    For example -
    For Jan, only one event ended and it took 8 days so the average would be 8 days.
    For Feb and Mar however, no events ended so the avg would be 0.
    To continue for clarity,
    3 events ended in April...

  2. #2
    Registered User
    Join Date
    01-20-2005
    Posts
    22

    Re: Formula for average duration for each month based on the ending month

    idk if this forum allows bumping of posts so I apologize in advance.

    Can anyone help me out with this one?
    I am at a total loss of how to get this done.

    I did find

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

    Re: Formula for average duration for each month based on the ending month

    See the attached file.

    I used month() and year() formula.

    After that i made an pivot table of it.
    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.

  4. #4
    Registered User
    Join Date
    01-20-2005
    Posts
    22

    Re: Formula for average duration for each month based on the ending month

    I'm not familiar with pivot tables and was hoping to avoid that.

    Ideally, I could use a formula similar to the one in columns F and G of the original sheet

    or
    A formula to sum the duration by month and from that I could simply divide by the result in Column G.

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

    Re: Formula for average duration for each month based on the ending month

    @bobby769

    If you gonna work, a lot, with excel I advice you to take a moment to learn the possibilities of Pivot Table.

    MS Excel expands the possibilities on each new version.

    It's an very, very, usefull and powerfull tool for such kind of work.

    I will take a look at you file again, an will come back with an formula solution.

    But:

    Do youself a favour and learn pivot table.

    Not long from now, you will be glad you have the tip to use it (if you found out all the solutions Pivot Table can give you).

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

    Re: Formula for average duration for each month based on the ending month

    See the attached file (with sumproduct)

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

    Re: Formula for average duration for each month based on the ending month

    Try this...

    Enter this array formula** in H2 and copy down to H13:

    =IF(G2>0,AVERAGE(IF(TEXT(End,"mmm")=E2,Duration)),0)

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    You may want to use rounding on these results as a couple of them are:

    41.6666666666667
    59.3333333333333

    How many decimal places would you want to round to?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

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

    Re: Formula for average duration for each month based on the ending month


+ 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