+ Reply to Thread
Results 1 to 9 of 9

Average data for last 30 days

  1. #1
    Registered User
    Join Date
    05-24-2008
    Location
    San Mateo, Ca
    Posts
    44

    Average data for last 30 days

    I have dates in column J and a corresponding number in column I. Rows of data get added daily. On another sheet I have the average of all the numbers in column I. How can I write a formula to average only the numbers in column I from the last 30 days?

    It's more complicated and they are also sorted by other parameters, but I'm keeping the question simple.

    Thanks,

    Dan

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

    Average data for last 30 days

    With Sheet1 containing the lists:
    Col_I contains amounts
    and
    Col_J contains dates

    Here are a couple approaches to try....

    This is an ARRAY FORMULA (committed with CTRL+SHIFT+ENTER,
    instead of just ENTER)
    Please Login or Register  to view this content.
    This is a longer regular formula, but its structure allows for more conditions:
    Please Login or Register  to view this content.
    Does that get you pointed in the right direction?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    05-24-2008
    Location
    San Mateo, Ca
    Posts
    44
    Sweet, I put in the array formula and it seems to work as desired, at least for the situation I've spelled out. Now I have to adapt it for my spreadsheet, which is a little more complicated.

    Here is the formula as I entered it to suit the sheet and cell ranges I am using:
    =AVERAGE(IF((TODAY()-DWeitsman!J6:J900)<=30,DWeitsman!I6:I900))

    I need to adapt the formula to take the same cell ranges from four different worksheets, plus add a condition from column H of each worksheet. Column H contains names, column I contains numerical grades, and I'm averaging grades from each person. I have a formula structure that does this already, but I'm trying to add one that does the last 30 days.

    I'd like to attach the spreadsheet so you can see what I'm trying to do, but it's 1.13 MB and the forum won't upload a file that size. Know of a place I can host a spreadsheet?

    Thanks,

    Dan

  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

    Average data for last 30 days

    Best would be if you could zip the file and attach it.

    Otherwise, here are some free filehosting sites that could be used:
    http://www.freefilehosting.net/index.cfm
    http://www.savefile.com/index.php
    http://drop.io/

  5. #5
    Registered User
    Join Date
    05-24-2008
    Location
    San Mateo, Ca
    Posts
    44
    Awesome, here's the link to download the file: http://savefile.com/files/1670551

    It should open to the "Auditor grades" worksheet, which has average grades given by each person for each name, and their total average grades. Each person has a worksheet that the grades are taken from.

    Off to the right side I have entered the array formula you posted, in the row titled Cory Murman. Right now it takes the average grade for ALL the numbers in column I in the sheet DWeitsman, regardless of the name in column H. I want it to take the average grade for only Cory Murman, from all sheets.

  6. #6
    Registered User
    Join Date
    05-24-2008
    Location
    San Mateo, Ca
    Posts
    44
    By the way, thanks in advance for taking a look at this, I know it's kind of a complicated operation. I bought the Excel Bible and I've been meaning to study up on it so I can do this stuff on my own, but until then I'd like to have a formula so we can start looking at these numbers. I work for a solar energy company and the log items are installations.

    Dan

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

    Average data for last 30 days

    Ok....Here's what you asked for:

    This horrendous formula on the Auditor Grades sheet will calculate
    the average grade for Cory Murman:
    Please Login or Register  to view this content.
    (I'm hoping somebody has a better formula than THAT)

    If it were me, I'd consolidate the 4 sheets into one sheet. That would significantly shrink that formula, since it would only be referencing one sheet.

    I hope that helps.

  8. #8
    Registered User
    Join Date
    05-24-2008
    Location
    San Mateo, Ca
    Posts
    44
    Thanks, I'll try out that formula when I have time to play with it and let you know how it goes. As far as the worksheets, it's not really feasible to put them all together because this is a shared workbook and jobs are entered by all four people throughout the day. If there were only one worksheet, and everybody was adding lines and putting their name into a separate column, there would be editing conflicts when they saved at the end of the day.

  9. #9
    Registered User
    Join Date
    05-24-2008
    Location
    San Mateo, Ca
    Posts
    44
    Or, I could make a chart of simpler formulas (like what already exists) using the 30-day rule and have a summary exactly like column C. That would probably be easier.

+ 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