+ Reply to Thread
Results 1 to 7 of 7

How to find the average of a range of cells?

  1. #1
    Registered User
    Join Date
    12-23-2010
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    66

    How to find the average of a range of cells?

    So column A has a list of dates. Column B has a list of numbers.

    I want to be able to type in a start date and end date and have excel return the Column B average for all the dates in between the two (inclusive of the start/end dates). I tried the following formula but it did not work:

    =average(ADDRESS(MATCH(...)):ADDRESS(MATCH(...)))

    Each individual =address(match)) function gives me the correct cell address, ex. $B$2, $B$15, but it won't calculate the average between the two cell addresses.

    What should I do?

    Thanks!
    Last edited by anon; 06-10-2012 at 03:36 PM.

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: How to find the average of a range of cells?

    Try

    =AVERAGEIFS($B$1:$B$24,$A$1:$A$24,">="&D1,$A$1:$A$24,"<="&E1)

    D1 >> Start date
    E1 >> End date
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    12-23-2010
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: How to find the average of a range of cells?

    Quote Originally Posted by jeffreybrown View Post
    Try

    =AVERAGEIFS($B$1:$B$24,$A$1:$A$24,">="&D1,$A$1:$A$24,"<="&E1)

    D1 >> Start date
    E1 >> End date
    Thanks! What if I want to do the same thing but find the minimum (or another statistical measure that doesn't have an 'if' version) instead of the average?

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: How to find the average of a range of cells?

    This would find the minimum value in column B that is greater than the start date matched against column A

    Array entered >> Ctrl + Shift + Enter
    =MIN(IF($A$1:$A$24>D1,$B$1:$B$24))

  5. #5
    Registered User
    Join Date
    12-23-2010
    Location
    usa
    MS-Off Ver
    Excel 2010
    Posts
    66

    Re: How to find the average of a range of cells?

    Quote Originally Posted by jeffreybrown View Post
    This would find the minimum value in column B that is greater than the start date matched against column A

    Array entered >> Ctrl + Shift + Enter
    =MIN(IF($A$1:$A$24>D1,$B$1:$B$24))
    Thanks again!

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: How to find the average of a range of cells?

    Hi anon,

    You could use an advanced filter on your data and then use any other normal functin you want on the result. See Advanced Filter using Date Ranges at:
    http://www.contextures.com/xladvfilter01.html
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: How to find the average of a range of cells?

    Thanks Marvin, always good to have options...

    @anon,

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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