+ Reply to Thread
Results 1 to 5 of 5

Using AVERAGEIFS to avg by month, if none found, avg last 3 good set

  1. #1
    Registered User
    Join Date
    05-13-2013
    Location
    Savannan, TN
    MS-Off Ver
    Excel 2007
    Posts
    14

    Question Using AVERAGEIFS to avg by month, if none found, avg last 3 good set

    Please Login or Register  to view this content.
    Using the above code I am looking at data that gets entered in on a random basis. We may have something to enter in one month while others we may not. Column A is the dates while Column B is the data and then it is looking at L423 to get the start date of the month and then uses the end of month formula to get an ending date for the month.

    I have attached a photo which may help illustrate what I am wanting to do. Like I said, data gets entered in if there is any, then the formula gives us a monthly average elsewhere in the workbook, however, if a particular month doesn't have any data I would like it then to average the last 3 monthly averages. (again look at the picture as it may help illustrate.) Capture.JPG

    Anybody know of a formula that may be able to do this?

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,624

    Re: Using AVERAGEIFS to avg by month, if none found, avg last 3 good set

    Since you didn't post a sample workbook, I suggest you do a count of the current month, if it is greater than zero then do the average, else do the last three averages
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    05-13-2013
    Location
    Savannan, TN
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Using AVERAGEIFS to avg by month, if none found, avg last 3 good set

    Here is a sample workbook.

    The count feature would be great, however, I don't want it to average other "averaged data." It needs to average the last 3 GOOD averages of actual data.

    For instance if I have information for January, February, & March but don't have anything for April, April would be the average of January, February, & March and then say I have something for May but not June, then the average for June would be February, March, May since April was an average of J, F, M. Make sense?
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,624

    Re: Using AVERAGEIFS to avg by month, if none found, avg last 3 good set

    maybe this one. I used a helper column to test if the date in column H is in the range in column A. If not, it uses the three values prior to it from the info table.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-13-2013
    Location
    Savannan, TN
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Using AVERAGEIFS to avg by month, if none found, avg last 3 good set

    Sweet deal! It is a step closer, however, it is looking at the wrong column for if no information is found. It needs to pull the last three monthly averages were as the info table is just daily averages so you are averaging the last three daily. I have re uploaded your sheet and made some corrections to my original data. Column I and J should match K and L exactly. K and L are what we actually reported and manually figured out.

    Another example, 7/1/2014 - 7/31/2014 has no daily data so it can't create a monthly average in cell I15 however 4/1/2014 - 6/1/2014 do have daily data which gives a monthly average in cell I12, I13, and I14. So I15 would be the average of I12, I13, and I14. HOWEVER, we don't have any data again until 1/1/2015 - 1/31/2015 (I21) and none in 2/1/2015 - 2/28/2015 (I22) so I22 would be the average of I21, I14, and I13 since those are the last three true averages. I hope that makes sense.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Need a forumla to look at a year and month and return a 1 if match found
    By john dalton in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-03-2014, 07:11 AM
  2. [SOLVED] Auto instert Month names for This month, Last month and Next month
    By hemal89 in forum Word Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2013, 12:01 PM
  3. IF Webpagecontent FOUND then X IF Webpage content NOT FOUND THEN Y
    By excelcandy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-01-2013, 02:57 PM
  4. Check for values in a table and if found add value found in column to left to list
    By robhargreaves in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-07-2013, 02:57 PM
  5. [SOLVED] Message (in one window) for each file found/not found
    By kboy1289 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-08-2013, 04:03 PM

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