Sumproduct & nagetive time

D

Dale G

So far I found I can use this, in column E.

=IF(C3<=D3,"+ ","- ")&TEXT(MAX(C3,D3)-MIN(C3,D3),"[m]:ss")

To display negative time, whereas before I was using,

=IF(D3="","",D3-C3) to leave the column E blank.

The 2nd one was good because it would leave the column blank until I made an
entry in D, is there a way to use the first Formula and leave the column
blank?

Also I'm using Sumproduct on another sheet to count the entrees in E.

Here is an example.

In B,
=SUMPRODUCT(--(LEFT(LTC!$F$3:$F$192,4)=OTP!A8),--(LTC!$E$3:$E$192<=--"0:10:59"),--(LTC!$E$3:$E$192<>""))

In C,
=SUMPRODUCT(--(LEFT(LTC!$F$3:$F$192,4)=OTP!A8),--(LTC!$E$3:$E$192>--"0:10:59"),--(LTC!$E$3:$E$192<>""))

When I use =IF(C3<=D3,"+ ","- ")&TEXT(MAX(C3,D3)-MIN(C3,D3),"[m]:ss") , the
sumproduct formula will count all entrees in C, >--"0:10:59"

Is there a way to make these 2 sheets work together?

I need anything negative and up to 0:10:59 in column B, and over 0:10:59 in
column C.
 
P

Peo Sjoblom

It's because text is always greater than numbers, try


=SUMPRODUCT(--(LEFT(LTC!$F$3:$F$192,4)=OTP!A8),--(LTC!$E$3:$E$192>--"0:10:59"),--(ISNUMBER(LTC!$E$3:$E$192)),--(LTC!$E$3:$E$192<>""))


--


Regards,


Peo Sjoblom
 
D

Dale G

I tried that and it doesn’t seem to work. Sumproduct is counting from E, I
wonder if Sumproduct can count from after I make an entry in D, the actual
time.

A B C D E
F

Run Vehicle Time Actual Diff Schedule
800 0 5:49 - 0 510N0545
914 0 6:01 - 0 511N0557

Can sumproduct do the math? If I enter in D, 5:50, 0r 5:48 could sumproduct
be set to place a count for any time up to 11min.
Maybe I could use it the way I had it, but use a different column, a hidden
column for sumproduct.




Peo Sjoblom said:
It's because text is always greater than numbers, try


=SUMPRODUCT(--(LEFT(LTC!$F$3:$F$192,4)=OTP!A8),--(LTC!$E$3:$E$192>--"0:10:59"),--(ISNUMBER(LTC!$E$3:$E$192)),--(LTC!$E$3:$E$192<>""))


--


Regards,


Peo Sjoblom

Dale G said:
So far I found I can use this, in column E.

=IF(C3<=D3,"+ ","- ")&TEXT(MAX(C3,D3)-MIN(C3,D3),"[m]:ss")

To display negative time, whereas before I was using,

=IF(D3="","",D3-C3) to leave the column E blank.

The 2nd one was good because it would leave the column blank until I made
an
entry in D, is there a way to use the first Formula and leave the column
blank?

Also I'm using Sumproduct on another sheet to count the entrees in E.

Here is an example.

In B,
=SUMPRODUCT(--(LEFT(LTC!$F$3:$F$192,4)=OTP!A8),--(LTC!$E$3:$E$192<=--"0:10:59"),--(LTC!$E$3:$E$192<>""))

In C,
=SUMPRODUCT(--(LEFT(LTC!$F$3:$F$192,4)=OTP!A8),--(LTC!$E$3:$E$192>--"0:10:59"),--(LTC!$E$3:$E$192<>""))

When I use =IF(C3<=D3,"+ ","- ")&TEXT(MAX(C3,D3)-MIN(C3,D3),"[m]:ss") ,
the
sumproduct formula will count all entrees in C, >--"0:10:59"

Is there a way to make these 2 sheets work together?

I need anything negative and up to 0:10:59 in column B, and over 0:10:59
in
column C.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top