+ Reply to Thread
Results 1 to 11 of 11

Daily Average Calculation

  1. #1
    Registered User
    Join Date
    06-06-2012
    Location
    Seguin, TX
    MS-Off Ver
    Excel 20007
    Posts
    28

    Daily Average Calculation

    I have a spreadsheet that has a months worth of data. If I have one column that has the dates in it, is there an easy way to calculate the daily average of another columns data?

    i.e.

    Column A Column B
    6/6/2012 1
    6/6/2012 5
    6/7/2012 5
    6/7/2012 11


    6/6/2012 Average: 3
    6/7/2012 Average: 8

    I'm not sure if this would be best done with a Macro???

    If anyone has any suggestions that would be appreciated!

  2. #2
    Registered User
    Join Date
    05-22-2012
    Location
    IL
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Daily Average Calculation

    You can use averageif - =AVERAGEIF(A:A,date,B:B)

    It would be easiest to use a cell reference for the date.

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

    Re: Daily Average Calculation

    Use a pivot table with the function average.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Daily Average Calculation

    If you use MS Query and then use this SQL statement in the query
    Please Login or Register  to view this content.
    You will have to adapt your path and file names to match your files.

    Here is a quick explanation on MS Query which is part of Excel

    http://www.exceluser.com/explore/msquery1_1.htm

    Very powerful stuff.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Daily Average Calculation

    @mmogharreban
    AVERAGEIF() isn't available pre-2007.

  6. #6
    Registered User
    Join Date
    06-06-2012
    Location
    Seguin, TX
    MS-Off Ver
    Excel 20007
    Posts
    28

    Re: Daily Average Calculation

    I would use a pivot table, but I need this data to either update itself (aka, through an equation) or update at a simple button click (aka, a macro)

    I am not very familiar with the MS Query. I read into it a little but it sounds like it will only update if the file is mapped correctly...therefore if I create the file and send it to an employee to use....the spreadsheet won't update itself with the averages while being filled out.

    These are all great ideas, and I wish I could just use the AVERAGEIF equation!

    Does anyone have any other suggestions?

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Daily Average Calculation

    You could use SUMPRODUCT()/days in the month

  8. #8
    Registered User
    Join Date
    06-06-2012
    Location
    Seguin, TX
    MS-Off Ver
    Excel 20007
    Posts
    28

    Re: Daily Average Calculation

    @cutter

    Could you ellaborate on the SUMPRODUCT idea....I was looking at the equation, but was unable to manipulate it to get the answers I want.

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Daily Average Calculation

    Actually I just re-read your original request. If you are just averaging for a single day then you can do
    =SUMIF(A:A,ref,B:B)/COUNTIF(A:A,ref) where ref is a cell address holding the date you want averaged.

    I thought you were trying to get a daily average for the month.

  10. #10
    Registered User
    Join Date
    06-06-2012
    Location
    Seguin, TX
    MS-Off Ver
    Excel 20007
    Posts
    28

    Re: Daily Average Calculation

    That did it.....thank you!
    @Cutter

  11. #11
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Daily Average Calculation

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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