View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Domenic[_2_] Domenic[_2_] is offline
external usenet poster
 
Posts: 265
Default =SUMPRODUCT(--(LEFT Bob Phillips

In article ,
Dale wrote:

Your right, I had that comma at one time but I lost it. Thank you.

within 10 minutes,
=SUMPRODUCT(--(LEFT($F$3:$F$96,4)=G4),--(ABS($C$3:$C$96-$D$3:$D$96)*SIGN($D$3:
$D$96-$C$3:$C$96)<=--"0:10:59"),--($D$3:$D$96<""))

Later then 10,

=SUMPRODUCT(--(LEFT($F$3:$F$123,4)=G4),--(ABS($C$3:$C$123-$D$3:$D$123)*SIGN($D
$3:$D$123-$C$3:$C$123)--"0:10:59"),--($D$3:$D$123<""))


With regards to your first formula, if for example the scheduled time is
10:15 and the arrival time is 10:00 the second argument would be
evaluated as true, even though the difference in time is greater than 10
minutes and 59 seconds. Any reason why the following would not suffice?

=SUMPRODUCT(--(LEFT($F$3:$F$96,4)=G5),--(ABS($D$3:$D$96-$C$3:$C$96)<="0:1
0:59"+0),--($D$3:$D$96<""))

and

=SUMPRODUCT(--(LEFT($F$3:$F$96,4)=G5),--(ABS($D$3:$D$96-$C$3:$C$96)"0:10
:59"+0),--($D$3:$D$96<""))

--
Domenic
http://www.xl-central.com