+ Reply to Thread
Results 1 to 5 of 5

Compute average temperature if between dates

  1. #1
    Registered User
    Join Date
    08-02-2012
    Location
    Phoenix, az
    MS-Off Ver
    Excel 2007
    Posts
    3

    Compute average temperature if between dates

    I need to compute the average temperature per week for multiple years of data with 48 data points per day. How do I get the average temp per week.

    An example of the data available follows.

    Date and Time (EDT) Temperature (°F)
    2012-06-26 16:01:37 84.2
    2012-06-26 16:31:37 84.02
    2012-06-26 17:01:37 84.74
    2012-06-26 17:31:37 84.92
    2012-06-26 18:01:37 85.1
    2012-06-26 18:31:37 84.92
    2012-06-26 19:01:37 84.74
    2012-06-26 19:31:37 84.74
    2012-06-26 20:01:37 84.38
    2012-06-26 20:31:37 84.2
    2012-06-26 21:01:37 83.48
    2012-06-26 21:31:37 82.58
    2012-06-26 22:01:37 82.22
    2012-06-26 22:31:37 82.04
    2012-06-26 23:01:37 81.86
    2012-06-26 23:31:37 81.5
    2012-06-27 00:01:37 81.14
    2012-06-27 00:31:37 80.6
    2012-06-27 01:01:37 80.24
    2012-06-27 01:31:37 79.7
    2012-06-27 02:01:37 79.34
    2012-06-27 02:31:37 78.8
    2012-06-27 03:01:37 78.44
    2012-06-27 03:31:37 78.08
    2012-06-27 04:01:37 77.54
    2012-06-27 04:31:37 77.18

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: Compute average temperature if between dates

    Why couldn't you have formula that averages every week worth of data {336 rows of data (48*7)}? ie =average(B1:B336)

    To get a daily rolling average you would average 336 rows of data separate by 48 rows (1 day).
    Click on star (*) below if this helps

  3. #3
    Registered User
    Join Date
    08-02-2012
    Location
    Phoenix, az
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Compute average temperature if between dates

    I do need to track averages by week and then chart those averages.

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Compute average temperature if between dates

    How about using a Pivot Table?

    • Insert a column before your data
    • Use this formula to determine which year-week the date/time is in
    A2: =YEAR(B2)&"_"&WEEKNUM(B2)
    (sample week will look like: 2011_51)

    • Copy that formula down as far as you need
    • A1: Week

    Next, build the Pivot Table
    • Select your data
    • Insert.PivotTable.Table
    ...select a destination
    ...Drag "Week" to the Row Labels
    ...Drag the date/time heading to Values
    ...Click the dropdown for the values
    ...Select "Value Field Settings"
    ...Change the calculation to: Average

    Click: OK

    That will give you the average temperature by week.

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  5. #5
    Registered User
    Join Date
    08-02-2012
    Location
    Phoenix, az
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Compute average temperature if between dates

    I believe that will work. Thanks for the help.

+ 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