+ Reply to Thread
Results 1 to 9 of 9

calculating formulas between 2 dates

  1. #1
    Forum Contributor
    Join Date
    04-08-2008
    Posts
    121

    calculating formulas between 2 dates

    Hi,

    I'm using the following formula:

    =SUMPRODUCT(((Progress!$G$2:$G$998<=$B2)*(Progress!$G$2:$G$998>=$A2)*(Progress!$J$2:$J$998="not complete")))

    I'm using this formula to count the number of "not complete" there are in column J between 2 dates: B2 = start of week and A2 = end of week. Column G has dates in them.

    Instead of counting thr cells with "not complete", in "column I" I want to make formulas to take the average of the numbers by week. So i will get an average amount per week.

    Do I use the same sort of formula or should I be using a different one?

    Any help would be much appreciated

    Thanks

    Harry

  2. #2
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Hi Harry,

    Are you trying to find the average % of all jobs that are not complete from all jobs? If this is so then you need to divide the formula you are using by

    Please Login or Register  to view this content.
    If this is not the case could you post back with a better description of what you want to achieve.
    Ed
    _____________________________
    Always learning, but never enough!
    _____________________________

  3. #3
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hello Harry,

    May be something like this to get a weekly average up to TODAY() using SUMPRODUCT
    Attached Files Attached Files
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  4. #4
    Forum Contributor
    Join Date
    04-08-2008
    Posts
    121
    Thanks-you for your responses. Sorry I didn't explain very well. Please see attached sheet.

    In sheet 2 I want a formula to provide an average of the number of days on sheet 1 column B between the 2 dates.

    Thanks
    Harry
    Attached Files Attached Files

  5. #5
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Try this

    Please Login or Register  to view this content.
    This error traps if there is no data in the relevant period

    And copy down
    Last edited by EdMac; 06-10-2008 at 09:43 AM.

  6. #6
    Forum Contributor
    Join Date
    04-08-2008
    Posts
    121
    Ed,

    Thanks very much for this. I see how it works, though I am trying to change the cell references to work with another sheet. See attached. On the Stats sheet I have the formula in column G averaging out the days in column K on the progress sheet between the 2 dates. It's not working for some reason and I think it's the fact that I have text and formulas in there. Also spaces. Is there any way of getting round this?

    Thanks
    Harry
    Attached Files Attached Files

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Try changing to this formula in G2 copied down

    =IF(SUMPRODUCT((Progress!$J$1:$J$500>=A2)*(Progress!$J$1:$J$500<=B2)), SUMPRODUCT((Progress!$J$1:$J$500>=A2)*(Progress!$J$1:$J$500<=B2),Progress!$K$1:$K$500)/ SUMPRODUCT((Progress!$J$1:$J$500>=A2)*(Progress!$J$1:$J$500<=B2)),"No data")

  8. #8
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    DLL's formula seems to pull the values through as you want


    Regards

  9. #9
    Forum Contributor
    Join Date
    04-08-2008
    Posts
    121
    Thanks for your feedback!

    Harry

+ 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