+ Reply to Thread
Results 1 to 4 of 4

Sumproduct in-between two date range with greater than and less than

  1. #1
    Forum Contributor
    Join Date
    08-07-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    372

    Sumproduct in-between two date range with greater than and less than

    Hi Forum Leader,

    Column A is a date
    Column B is a overtime hours from Monday to Friday
    Column C is a working hours from Monday to Sunday

    DATA;

    DATE ***********OVER TIME-MONDAY TO FRIDAY TOTAL WORKING HOURS
    20/03/2017 ******1.5**********************************8
    23/03/2017 ******1 **********************************8
    24/03/2017 *****0.5 **********************************8
    27/03/2017** 2.5 **********************************8
    29/03/2017***** 2.5 **********************************8

    REQUIRED FORMAT;

    SHIFT *******TOTAL WORKING HOUR
    Saturday ******* 42
    Sunday ******* 91
    Overtime < 2 ****** 5
    Overtime > 2 ****** 5

    Query 1;

    Am trying to achieve the result sum of working hours for Saturday and Sunday

    Am try to apply the formula in D3 and D4 for Saturday and Sunday name of the sheet “Payslip”

    Saturday

    =SUMPRODUCT(('TIME SHEET'!$A$2:$A$92 > PAYSLIP!$D$1)*('TIME SHEET'!$A$2:$A$92 < PAYSLIP!$E$1)*--(WEEKDAY('TIME SHEET'!$A$2:$A$92,1)=7)*('TIME SHEET'!$C$2:$C$92))

    Sunday

    =SUMPRODUCT(('TIME SHEET'!$A$2:$A$92 > PAYSLIP!$D$1)*('TIME SHEET'!$A$2:$A$92 < PAYSLIP!$E$1)*--(WEEKDAY('TIME SHEET'!$A$2:$A$92,1)=1)*('TIME SHEET'!$C$2:$C$92))

    Query 2;

    Sum of units for over time from Monday to Friday two different ranges less than 2 hours and great than 2 hours
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,253

    Re: Sumproduct in-between two date range with greater than and less than

    Try

    in D3

    =SUMPRODUCT(('TIME SHEET'!$A$2:$A$92>=PAYSLIP!$D$1)*('TIME SHEET'!$A$2:$A$92<=PAYSLIP!$E$1)*--(WEEKDAY('TIME SHEET'!$A$2:$A$92,1)=7),('TIME SHEET'!$C$2:$C$92))

    in D4

    =SUMPRODUCT(('TIME SHEET'!$A$2:$A$92>=PAYSLIP!$D$1)*('TIME SHEET'!$A$2:$A$92<=PAYSLIP!$E$1)*--(WEEKDAY('TIME SHEET'!$A$2:$A$92,1)=1),('TIME SHEET'!$C$2:$C$92))

    in D5

    =SUMPRODUCT(('TIME SHEET'!$A$2:$A$92>=PAYSLIP!$D$1)*('TIME SHEET'!$A$2:$A$92<=PAYSLIP!$E$1)*('TIME SHEET'!$B$2:$B$92<2),('TIME SHEET'!$B$2:$B$92))

    in D6

    =SUMPRODUCT(('TIME SHEET'!$A$2:$A$92>=PAYSLIP!$D$1)*('TIME SHEET'!$A$2:$A$92<=PAYSLIP!$E$1)*('TIME SHEET'!$B$2:$B$92>2),('TIME SHEET'!$B$2:$B$92))
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    08-07-2014
    Location
    India
    MS-Off Ver
    2007
    Posts
    372

    Re: Sumproduct in-between two date range with greater than and less than

    thank you so much for your help.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,253

    Re: Sumproduct in-between two date range with greater than and less than

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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] Find maximum date with from range with last value greater than zero from next column
    By anotherbe01 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-27-2017, 07:31 PM
  2. [SOLVED] Find number of days greater than zero between date range.
    By Mayzach in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-30-2013, 02:17 PM
  3. [SOLVED] match closest date in range but not greater than limits
    By Oldeuboi in forum Excel General
    Replies: 9
    Last Post: 11-25-2012, 12:15 PM
  4. Replies: 3
    Last Post: 01-18-2012, 12:12 PM
  5. Replies: 6
    Last Post: 12-12-2011, 09:07 PM
  6. Countif Greater Than/Less Than Date Range
    By mycon73 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2008, 02:11 AM
  7. How do I sum a range if the date is is greater than today's date?
    By S2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-08-2005, 04:05 PM

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