+ Reply to Thread
Results 1 to 10 of 10

SUMIFS equal or less/more than Time problem

  1. #1
    Registered User
    Join Date
    08-13-2015
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    6

    SUMIFS equal or less/more than Time problem

    Hi I've spent the last two hours trying to figure this out. I'm trying to calculate the savings achieved based on amount of Time spent. There are two types of time, Normal and OverTime. I can't figure out why it works for IF but not for SUMIFS. Because it is a range, and has multiple entries, the IF function is insufficient. I tried using the 'Date' method (i.e., ">='&A1) but it doesn't seem to work for some reason and the value always computes to 0. These are examples of the functions.

    =SUMIFS(Input!$M$5:$M$5489,Input!$G$5:$G$5489,"Optimized",Input!$H$5:$H$5489,"Crane",Input!$B$5:$B$5489,">="&$C$5,Input!$B$5:$B$5489,"<="&$D$5,Input!$K$5:$K$5489,"<=08:00",Input!$L$5:$L$5489,">=16:00")

    Input!$K$5:$K$5489,"<=08:00",Input!$L$5:$L$5489,">=16:00" doesn't seem to work, does anyone know why? And perhaps have a solution?

    On the other hand: =IF(AND(Input!$K$5:$K$5489>=I21,Input!$L$5:$L$5489<=I22),SUMIFS(Input!$M$5:$M$5489,Input!$G$5:$G$5489,"Optimized",Input!$H$5:$H$5489,"Crane",Input!$B$5:$B$5489,">="&$C$5,Input!$B$5:$B$5489,"<="&$D$5)*Menu!$AL$24)

    This computes the right number, but I need more conditions to be met...

    Please and Thank you.

  2. #2
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: SUMIFS equal or less/more than Time problem

    Welcome to the forum.

    It is always advisable to attach a sample workbook. It makes it easier for forum members to understand your issues.

    That said, I think your problem comes from using time in the SUMIFS() formulas. Try using .33333333 (8/24) and .66666666 (16/24) instead.

    Please Login or Register  to view this content.

    I hope this helps, please let me know!

    Regards,

    David

    Please remember, your request is clearer if you attach a sample workbook.
    - Click on Go Advanced and click on the Paper Clip.

    If this has been of assistance, please advise.
    - Please click on the *Add Reputation button at the bottom of helpful responses.

    Please mark your thread as SOLVED:
    - Click Thread Tools above your first post, select "Mark your thread as Solved".


  3. #3
    Registered User
    Join Date
    08-13-2015
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    6

    Re: SUMIFS equal or less/more than Time problem

    Thanks David, that pretty much worked. I do have a 24hr problem now though. If I want to get a range between say 1600 and 0100 hours, it won't compute. This is what I've got so far:

    =SUMIFS(Input!$M$5:$M$5489,Input!$G$5:$G$5489,"Optimized",Input!$H$5:$H$5489,"Crane",Input!$B$5:$B$5489,">="&$C$5,Input!$B$5:$B$5489,"<="&$D$5,Input!$K$5:$K$5489,">=16:00",Input!$L$5:$L$5489,IF(Input!$L$5:$L$5489<TIME(8,0,0),"<8:00",IF(Input!$L$5:$L$5489>TIME(16,0,0),">16:00")))

    Any ideas?

  4. #4
    Registered User
    Join Date
    08-13-2015
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    6

    Re: SUMIFS equal or less/more than Time problem

    I also tried this, which only works half the time. and is driving me crazy.

    =SUMIFS(Input!$M$5:$M$5489,Input!$G$5:$G$5489,"Optimized",Input!$H$5:$H$5489,"Crane",Input!$B$5:$B$5489,">="&$C$5,Input!$B$5:$B$5489,"<="&$D$5,Input!$K$5:$K$5489,">=16:00",Input!$L$5:$L$5489,IF(Input!$L$5:$L$5489<TIME(8,0,0),"<8:00",">16:00"))

  5. #5
    Forum Expert
    Join Date
    11-26-2013
    Location
    Colac, Victoria, Australia
    MS-Off Ver
    Excel 2016
    Posts
    1,309

    Re: SUMIFS equal or less/more than Time problem

    Please post some sample data - I don't need the whole 5,000 rows - just enough to cover both scenarios.

    David

  6. #6
    Registered User
    Join Date
    08-13-2015
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    6

    Re: SUMIFS equal or less/more than Time problem

    I think it's loaded. Is it sufficient?
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-13-2015
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    6

    Re: SUMIFS equal or less/more than Time problem

    uhh... bump? does anyone know how to solve this?

  8. #8
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: SUMIFS equal or less/more than Time problem

    So, assuming all else being equal (i.e. Crane, Optimised, and falling between the dates), if it's not Normal savings, it must be OT savings right?

    If so, you can just do a SUMIFS of the first 3 conditions (Crane, Optimised, start/end dates), and minus off whatever that falls within Normal savings.

    I.e. formula in G4 is
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    08-13-2015
    Location
    Malaysia
    MS-Off Ver
    2010
    Posts
    6

    Re: SUMIFS equal or less/more than Time problem

    Thank you. Mind is blown. So easy I want to cry. Thanks again!

  10. #10
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: SUMIFS equal or less/more than Time problem

    You're welcome. It happens to the best of us.

    If this resolves your initial query, can you kindly mark this thread as solved by clicking on Thread Tools above your initial post and clicking on Mark This Thread as Solved.

+ 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. Sumifs not equal to
    By Shoemate in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-14-2015, 01:50 PM
  2. Sumifs not equal to
    By Shoemate in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-13-2015, 11:13 AM
  3. [SOLVED] sumifs does not equal
    By rs1aj in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 06-17-2015, 10:22 PM
  4. SumIfs containing a greater than or equal to And less than or equal to
    By teton88 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-15-2014, 07:47 PM
  5. [SOLVED] COUNTIFS function w/greater than or equal to, and less than or equal to time values
    By AliciaRenee in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-27-2014, 03:57 PM
  6. [SOLVED] SUMIFS greater than or equal
    By telton in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-11-2013, 04:55 AM
  7. [SOLVED] Sumifs, problem with the formula: =sumifs(c10:c200,<=today(),0)
    By Faustocruz in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-08-2012, 04:26 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