+ Reply to Thread
Results 1 to 7 of 7

Average by number of months

  1. #1
    Forum Contributor
    Join Date
    10-05-2012
    Location
    Washington
    MS-Off Ver
    Excel 2013
    Posts
    110

    Average by number of months

    I am a little stuck on this one and hopefully somebody will be able to help me out. I have a large data file that contains the usage for all my parts. I am looking to average their usage so I can plan my purchasing accordingly. What I am hoping for is a formula that will count the number of months between the first issue of a part and today then divide the total usage by that number.

    I have attached a sample of of my data.

    Thanks in advance.
    Attached Files Attached Files

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

    Re: Average by number of months

    See the attached file, with an pivot table.

    Maybe this is what you're looking for.

    Please reply.
    Attached Files Attached Files
    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
    Valued Forum Contributor AZ-XL's Avatar
    Join Date
    03-22-2013
    Location
    Azerbaijan, Baku
    MS-Off Ver
    Excel 2007
    Posts
    603

    Re: Average by number of months

    if your table sorted by month from oldest to newest: =DATEDIF(INDEX($A$2:$A$11,MATCH(A14,$B$2:$B$11,0)),TODAY(),"M")
    if your dates in table are mixed: =DATEDIF(INDEX($A$2:$A$11,MATCH(A14,$B$2:$B$11,0)),TODAY(),"M") Ctrl+Shift+enter
    Appreciate the help? CLICK *

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,951

    Re: Average by number of months

    Or this in cell C14 and copy down:

    =SUMIF($B$2:$B$11,A14,$C$2:$C$11)/DATEDIF(INDEX($A$2:$A$11,MATCH(A14,$B$2:$B$11,0)),TODAY(),"m")

    Non array formula approach.
    Last edited by BadlySpelledBuoy; 08-17-2013 at 03:45 AM.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Average by number of months

    Or another approach using an array formula...

    =SUMIF($B$2:$B$11,A14,$C$2:$C$11)/DATEDIF(MIN(IF($B$2:$B$11=A14,$A$2:$A$11,99999)),TODAY(),"m")

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Contributor
    Join Date
    10-05-2012
    Location
    Washington
    MS-Off Ver
    Excel 2013
    Posts
    110

    Re: Average by number of months

    Thank you all for the quick responses. I will give them a try and reply back when i am done.

  7. #7
    Forum Contributor
    Join Date
    10-05-2012
    Location
    Washington
    MS-Off Ver
    Excel 2013
    Posts
    110

    Re: Average by number of months

    I ended up emplementing BadlySpelledBuoy's solution. It was exactly wat i was looking for without the need of an array. thanks again everybody for your input.

+ 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] Average a number into months left in year
    By jgryctz in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-14-2013, 02:50 PM
  2. Average - Change the number of months
    By sandraj2013 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-16-2013, 04:53 PM
  3. Number of months (elapsed months) between two dates
    By Timbite in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-17-2012, 11:37 AM
  4. [SOLVED] Average - 3 months / 6 months trend line ( array formula? )
    By ccernat in forum Excel General
    Replies: 3
    Last Post: 04-04-2012, 06:24 AM
  5. Average Months into Years/Months
    By mv835 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2011, 02:45 AM

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