+ Reply to Thread
Results 1 to 3 of 3

Calculating the Average Value based on certain criteria

  1. #1
    Registered User
    Join Date
    01-22-2020
    Location
    Cape Town, South Africa
    MS-Off Ver
    2016
    Posts
    7

    Calculating the Average Value based on certain criteria

    Good Day

    I have a problem statement where I need to calculate the average over a particular period based on certain criteria (i.e.) Opening Value on Day 1 less Specific number of payments over "x" number of days which then equals a closing balance which will always equal zero and I'm looking for a formula that could be input into a cell as opposed to the standard =Average(x,y,z) formula

    File attached as example.

    Thanks for the assistance.
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Calculating the Average Value based on certain criteria

    It's less Excel than just math.

    Use the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    of course it can be simplified (and one unnecessary bracket removed) to:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    but the first form explains better how was it calculated.

    Notice the values in column F are:
    B2+0
    B2+B4 (remember B4 is negative)
    B2+2*B4
    ...
    B2+n*B4 (until n = B3-1) - so in sample case B2+2*B4 was final element

    and then zeros untiil B6-th position

    We take a sum of all the above elements and divide it by B6 to get the average

    so B2*B3 + sum of 0+B4+2*B4+... n*B4 (n=B3-1)
    But the sum of 0+1 + 2 + ... B3-1 is the sum of arithmentic progression from 0 to B3-1 (B3 elements, so it's (0+(B3-1))*B3/2 =(B3-1)*B3/2
    Last edited by Kaper; 08-19-2020 at 07:57 AM.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    01-22-2020
    Location
    Cape Town, South Africa
    MS-Off Ver
    2016
    Posts
    7

    Re: Calculating the Average Value based on certain criteria

    Thank you very much

+ 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. Calculating an average based on set criteria
    By joemit1 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-04-2016, 04:34 PM
  2. Calculating an average based on set criteria
    By joemit1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-03-2016, 06:58 PM
  3. Calculating an average based on set criteria
    By joemit1 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-03-2016, 06:57 PM
  4. Replies: 0
    Last Post: 01-22-2013, 12:22 PM
  5. [SOLVED] Calculating Average Based on Multiple Criteria
    By Scott_88 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-13-2012, 07:05 AM
  6. Calculating Average based on criteria
    By joogibabu in forum Excel General
    Replies: 2
    Last Post: 07-30-2010, 12:21 AM
  7. [SOLVED] Calculating an average based on 2 and 3 criteria
    By craggergirl in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-24-2006, 11:10 AM

Tags for this Thread

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