Can someone look here to see why Aplication.WorksheetFunction.SumIf return 0 at this:
Please Login or Register to view this content.
Can someone look here to see why Aplication.WorksheetFunction.SumIf return 0 at this:
Please Login or Register to view this content.
Last edited by zbor; 10-31-2012 at 09:29 AM.
you need to convert Now to a number
Please Login or Register to view this content.
Josie
if at first you don't succeed try doing it the way your wife told you to
Thanks JP!
But still, second approach now take all values (even greater than Now) while Evaluate take correct.
both return the same values for me
I've just downloaded same file (so can be sure I've uploaded right).. And without any changes I got:
test 1: 75 (correct)
test 2: 81 (total sum in G column)
Check your NOW status and data in the sheet.. Write in values that are greater than your local time (maybe that's problem if all times are less than your local time).
tested a few times-get the same results in each message box every time and it's never 81
What if you manually define one date and time
then use it instead of NOW()Please Login or Register to view this content.
What Msgbox return?Please Login or Register to view this content.
I still got 81 (suming all values, no matter of <= )
aha-it's your regional settings. I changed mine to croatia and have the same error you do-change the code to
Please Login or Register to view this content.
thanks again JP.. So I'm not crazy after all
I had to change your formula into:
Because it count only up to 1009 (while first was OK) or up to 31.10.2012. 16:48Please Login or Register to view this content.
(since it's 0.7 it counted up to 1440 (total) * 0.7 = 1008 +1 )
Solved now
Edit: Actually, you might even extend number of zeros depending on precision of time you need. For example:
Please Login or Register to view this content.
Last edited by zbor; 11-02-2012 at 03:16 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks