+ Reply to Thread
Results 1 to 6 of 6

average values if month equals?

Hybrid View

  1. #1
    Registered User
    Join Date
    02-17-2007
    Posts
    2

    average values if month equals?

    I have a list of groundwater level values in 800 different wells that were measured in April and October of each year from 1982-present. The problem is that they are listed in order:
    Date ELV
    04/16/1981 120.37
    09/17/1981 119.25
    04/10/1982 120.52
    10/10/1982 118.1
    04/10/1983 124.36
    10/10/1983 120.43
    ect.

    I want a formula that will average all the April values and another one that will average all the October values. Help Please!

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,719
    I notice that one of your "October" readings took place in September, do you want to include that with October? If so perhaps

    =AVERAGE(IF(MONTH(A2:A800)>6,B2:B800))

    confirmed with CTRL+SHIFT+ENTER

    this will average all readings in the second half of the year, if you just want October specifically then change >6 to =10. Obviously you can do a similar thing for April (=4).

  3. #3
    Registered User
    Join Date
    01-22-2013
    Location
    Texas
    MS-Off Ver
    Excel 2007, 2013
    Posts
    31

    Re: average values if month equals?

    I have a similar question for you now. I need to do the same thing, but want it to average based on month and year. I have daily data and want to average everything for January 2000 into one cell and February of 2000 and so on.

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    With an array function, use Control SHift Enter instead of Enter ...
    =AVERAGE(IF(MONTH(A1:A100)=4,B1:B100))
    HTH
    Carim


    Top Excel Links

  5. #5
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211
    Quote Originally Posted by joshepting
    I have a list of groundwater level values in 800 different wells that were measured in April and October of each year from 1982-present. The problem is that they are listed in order:
    Date ELV
    04/16/1981 120.37
    09/17/1981 119.25
    04/10/1982 120.52
    10/10/1982 118.1
    04/10/1983 124.36
    10/10/1983 120.43
    ect.

    I want a formula that will average all the April values and another one that will average all the October values. Help Please!
    =SUMPRODUCT(--(MONTH(A1:A100)=4),B1:B100)/SUMPRODUCT(--(MONTH(A1:A100)=4))

  6. #6
    Registered User
    Join Date
    01-22-2013
    Location
    Texas
    MS-Off Ver
    Excel 2007, 2013
    Posts
    31

    Re: average values if month equals?

    Is there a way to use this formula and exclude zeros and blank cells?

+ 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