+ Reply to Thread
Results 1 to 14 of 14

Trying to make a table to average cells between two dates I specify in a workbook.

  1. #1
    Registered User
    Join Date
    01-22-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Trying to make a table to average cells between two dates I specify in a workbook.

    I have a workbook that separates each month in a different tab. Within that tab are 11 columns for different stations. Each day of the month is listed down the side and split into 3 shifts. Part counts are recorded in the boxes when parts are ran, sometimes no parts are ran so they enter a 0 or leave blank.

    How can i have the "Calc" tab have each cell listed (11) and let me enter two dates in which it will average the part counts for all shifts within those dates i enter??? I have tried a few variations of AVERAGEIF with little to no luck. I am familiar with most basic formulas in excel and how they work, but this one is really testing me....any help would be greatly appreciated!!
    Last edited by afazer; 01-23-2014 at 03:32 PM.

  2. #2
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    Hello and Welcome to the forum what results you are expecting for c100 for your given dates in calc tab
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    WANT TO SAY THANKS, HIT ADD REPUTATION (*) AT THE BOTTOM LEFT CORNER OF THE POST

    More we learn about excel, more it shows us, how less we know about it.

    for chemistry
    https://www.youtube.com/c/chemistrybyshivaansh

  3. #3
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    Copy paste below in C4 and drag to right
    =AVERAGE(INDEX(JAN!$C$2:$M$94,MATCH(CALC!$A$4,JAN!$A$2:$A$94,0),MATCH(CALC!C$3,JAN!$C$1:$M$1,0)):INDEX(JAN!$C$2:$M$94,MATCH(CALC!$B$4,JAN!$A$2:$A$94,0)+2,MATCH(CALC!C$3,JAN!$C$1:$M$1,0)))

    hope this helps

  4. #4
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    Copy paste below in C4 and drag to right
    =AVERAGE(INDEX(JAN!$C$2:$M$94,MATCH(CALC!$A$4,JAN!$A$2:$A$94,0),MATCH(CALC!C$3,JAN!$C$1:$M$1,0)):INDEX(JAN!$C$2:$M$94,MATCH(CALC!$B$4,JAN!$A$2:$A$94,0)+2,MATCH(CALC!C$3,JAN!$C$1:$M$1,0)))

    hope this helps

    if this is helpful click "*" add rep icon in the bottom left corner of my post
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-22-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    This does help! Thanks!

    How do i get it to drop out any zeros and blank spaces-so it is an average of only the days there is production?

  6. #6
    Registered User
    Join Date
    01-22-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    Also, will this work for any date in the year?? (Thus and worksheet in the workbook?) Eventually I would like to pull historical data from past years and be able to easily find production rates between any 2 dates throughout the year.

    Thanks much!

  7. #7
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    Hello Afazar ! I was quite busy so could not respond . Copy and paste below
    =SUM(INDEX(JAN!$C$2:$M$94,MATCH(CALC!$A$4,JAN!$A$2:$A$94,0),MATCH(CALC!C$3,JAN!$C$1:$M$1,0)):INDEX(JAN!$C$2:$M$94,MATCH(CALC!$B$4,JAN!$A$2:$A$94,0)+2,MATCH(CALC!C$3,JAN!$C$1:$M$1,0)))/SUM(IF(INDEX(JAN!$C$2:$M$94,MATCH(CALC!$A$4,JAN!$A$2:$A$94,0),MATCH(CALC!C$3,JAN!$C$1:$M$1,0)):INDEX(JAN!$C$2:$M$94,MATCH(CALC!$B$4,JAN!$A$2:$A$94,0)+2,MATCH(CALC!C$3,JAN!$C$1:$M$1,0))>0,1,0))
    then hold control and shift , now hit enter and release all three keys to make it array formula drag to right
    and This formula will work for any dates between month but not for workbook.

  8. #8
    Registered User
    Join Date
    01-22-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    What's the difference between this one and the previous? I am getting the same result....

    Is there a way to get it to work across the entire workbook?

    I'm guessing I would just have to change the "JAN" to "FEB" to get it to work for the "FEB" sheet?

    Does this drop out and "0" or blank cells to get an average of only the days there is production?

  9. #9
    Registered User
    Join Date
    01-22-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    I see this does indeed drop out any "0"s. The blank cells are not counted when doing an average so this works.

    Now if you could help get this to work across the entire workbook, or tell me how to change for each separate month, well be all set!! I'm guessing I would just have to change the "JAN" to "FEB" to get it to work for the "FEB" sheet and so on.....

  10. #10
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    yes you need to change start date and end date i.e. 10/01/2014 , 15/01/2014 to your desired date !

    but dates should be in the same month ! i.e. like 02/02/2014 and 20/02/2014 instead of 02/02/2014 and 20/05/2014 and like wise

  11. #11
    Registered User
    Join Date
    01-22-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    No way to cross-reference the sheets so i could search between different months? i.e. 1/17/14-2/5/14?

    I guess I could just make 12 rows on my "CALC" page, one for each month, and then average the 2 if they overlap....does that sound correct?

  12. #12
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    Yes ! you are correct

  13. #13
    Registered User
    Join Date
    01-22-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    Thanks! Solved!

  14. #14
    Forum Expert
    Join Date
    02-19-2013
    Location
    India
    MS-Off Ver
    07/16
    Posts
    2,386

    Re: Trying to make a table to average cells between two dates I specify in a workbook.

    Thanks for the feedback ! Will try with multiple sheets and get back if possible

+ 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. How to make connection to other workbook's specific Table?
    By bristly in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-12-2013, 12:52 PM
  2. [SOLVED] concatenate cells to make average function that works
    By umbata in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-12-2013, 02:06 PM
  3. how to make cells change colour when dates expire
    By hope6 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-13-2012, 01:40 PM
  4. Make dates not show in Pivot Table
    By Lynn McCurdy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2011, 01:36 AM
  5. column list of dates, average random cells
    By kufram in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 01-02-2009, 07:38 AM

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