+ Reply to Thread
Results 1 to 14 of 14

summing multiple criteria between date range formula question

  1. #1
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    summing multiple criteria between date range formula question

    Hello group!

    I was curious if anyone knew a more efficient way to either shorten or to take the following data/formula to sum the data between two dates as reflected in another formula below this one?:
    Please Login or Register  to view this content.
    This formula represents one criteria to sum between two dates, but I need it to reflect all of the criteria above without making a mega long formula if possible, etc:
    Please Login or Register  to view this content.
    Thanks for any suggestions!

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: summing multiple criteria between date range formula question

    For the first formula, you could try this instead:

    Please Login or Register  to view this content.
    The red ellipses represent the rest of your criteria range.

    This is also an array function that needs to be entered with CTRL+SHIFT+ENTER
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Re: summing multiple criteria between date range formula question

    Thanks mcmahobt for the formula suggestion. Any way I could use something like that to sum between two dates as reflected in the 2nd formula?

  4. #4
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: summing multiple criteria between date range formula question

    The long summation of SUMPRODUCT formulas you posted each multiply by a different coefficient. Does this mean you want to sum the values between the two dates for that one SUMPRODUCT formula only? or for every SUMPRODUCT formula within the summation?

  5. #5
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Re: summing multiple criteria between date range formula question

    mcmahobt-I need it for every sumproduct within the summation between the two date ranges. Sorry for my belated reply!

  6. #6
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: summing multiple criteria between date range formula question

    Please Login or Register  to view this content.
    Also an array formula, entered with CSE.

    This should add in the constraints based on date. However, this is not tested since you have not provided a sample workbook.
    Last edited by mcmahobt; 04-01-2015 at 09:44 AM.

  7. #7
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Re: summing multiple criteria between date range formula question

    Thanks mcmahobt I'll test it out

  8. #8
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Re: summing multiple criteria between date range formula question

    mcmahobt-I attached a sample workbook with a shorter formula attempt to test the formula. I'm getting an error, but I might have misunderstood your formula.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: summing multiple criteria between date range formula question

    Now seeing how your workbook is setup, I think you need to explain what you are trying to accomplish, because based on your previous formula it isn't clear.

  10. #10
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Re: summing multiple criteria between date range formula question

    Ideally what I need the formula to do is calculate hours worked within a weeks date range. So in the sample I've set it for the week of May 3rd thru the 9th; the dates being set from the "Payroll" sheet. In my example for John Doe he has one 4hr comp time off in that week. So the formula would recognize that 4hrs and would provide me the end result of 36hrs, which they worked that week. For Jane Smith the formula when applied would give me 48 (due to the fact that her scheduled days off (DO) were not added in the sample for that same date range. Hope this makes sense! Thanks again for taking the time to look at this!

  11. #11
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: summing multiple criteria between date range formula question

    This still isn't quite making sense to me. What is the point of the different values in the cells (8C, 8V, 4c▼, etc)? If you are just trying to calculate hours worked, what is the point of the Payroll worksheet at all?

  12. #12
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Re: summing multiple criteria between date range formula question

    mcmahobt-My actual workbook is a yearly schedule with tabs for each month (January through December). The sample just shows a very small section of what the schedule would like for two employees for the month of May 2015. Our bi-weekly payroll ends on a Saturdays, which the cutoff is reflected by the "X" in row 2. The schedule has many options that an employee can take, throughout their given work week; i.e. compensatory time off, vacation time, personal leave, sick time, etc (all at varying hours). The first formula (the longest one) demonstrates all of the types of symbols that an employee could have potentially show up in any given week on the work schedule. My sample only demonstrated two types (one for each employee) during the week of 5/3 to 5/9. The Payroll sheet does a lot more than what this sample payroll sheet does, but both break down each week that I need to keep track of hours worked by an employee; especially important now for part-time employees so that they don't exceed maximum hours allowed. In the sample workbook on the May sheet in cell AJ4 I have text 5/3-5/9. I would have additional dates to the right of that cell like 5/10-5/16 and so on for those weeks in May. Under each of the text dates I need a formula to look at that particular employee's schedule row between that given date range and then count any empty cells as 8hrs worked, plus it must recognize the other symbols (i.e. 4V, 4C, 4c▼, etc). So if an employee had a 4V in that given week as the only time off (minus their normally scheduled days off [DO]), the formula would recognize the empty cells as 8hrs each and the 4V as the employee worked 4 hrs only of their 8 hr shift and the result would be 36. If an employee had taken 1.5 hrs of personal leave time instead and had worked the rest of the week; the formula would give me the result of 38.5 for that week that the employee worked. Let me know if this explanation helped or not. Thanks again!

  13. #13
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: summing multiple criteria between date range formula question

    So it seems like there is a lot going on, so I proposed a setup like the one attached. For a little guidance, what is going on is the symbols in E11:P11 are found within the attendance table above it (Jane Smith is the example used). The total sum of hours for each symbol is then extracted.

    Then, the range of working days (in Jane Smith's example, D1:R1) that do not have any values/text within them are counted, and multiplied by 8 to give you number of full working days within the two weeks.

    Then, the total number of hours from the Leave table is summed, and subtracted from the number of working hours in the week.

    Hopefully something like this is easier to follow than the ridiculous formula from before.
    Attached Files Attached Files

  14. #14
    Valued Forum Contributor
    Join Date
    03-17-2007
    Location
    Michigan
    MS-Off Ver
    Excel 2021
    Posts
    974

    Re: summing multiple criteria between date range formula question

    mcmahobt-I really appreciate your efforts, but I don't think that will do what I need. Thanks for taking the time to help though. Your suggestions are very helpful!

+ 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] Sumproduct Formula - With date range and multiple criteria
    By kellydvorak in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-19-2014, 09:07 PM
  2. Replies: 4
    Last Post: 07-26-2013, 03:38 PM
  3. [SOLVED] Summing Multiple Criteria with moving date column
    By dmang1 in forum Excel General
    Replies: 12
    Last Post: 06-21-2012, 12:49 AM
  4. Formula Problem Summing With Multiple Criteria
    By bmelton in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2011, 12:06 PM
  5. Replies: 4
    Last Post: 05-16-2008, 02:27 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