I haven't been following this thread too closely but with the dates in
Column A, truck registration in Column B and the odometer reading in Column
C all starting from Row 4:
=IF(OR(COUNTIF($B$4:B5,B5)<2,MONTH(A5)<>2),"",MAX(($B$4:B5=B5)*(MONTH($A$4:A5)=2)*$C$4:C5)-MAX(($B$4:B4=B5)*(MONTH($A$4:A4)=2)*$C$4:C4))
Array entered with Ctrl + Shift + Enter not just Enter and copied down will
return the mileage since the time that the truck registration in that row
was refueled.
=IF(OR(COUNTIF($B$4:B5,B5)<2,MONTH(A5)<>2),"",MAX(($B$4:B5=B5)*(MONTH($A$4:A5)=2)*$A$4:A5)-MAX(($B$4:B4=B5)*(MONTH($A$4:A4)=2)*$A$4:A4))
Array entered will return the number of days in the above period and:
=IF(OR(COUNTIF($B$4:B7,B7)<2,MONTH(A7)<>2),"",(MAX(($B$4:B7=B7)*(MONTH($A$4:A7)=2)*$C$4:C7)-MAX(($B$4:B6=B7)*(MONTH($A$4:A6)=2)*$C$4:C6))/(MAX(($B$4:B7=B7)*(MONTH($A$4:A7)=2)*$A$4:A7)-MAX(($B$4:B6=B7)*(MONTH($A$4:A6)=2)*$A$4:A6)))
Again Array entered will return the average daily mileage in that period.

Signature
HTH
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
sandymann2@mailinator.com
Replace @mailinator.com with @tiscali.co.uk
>I guess my problem is that not all the trucks fueled on the 1st day of the
> month so I have different start days and not all trucks will fuel on the
[quoted text clipped - 30 lines]
>> > explained this enough that someone will understand what I'm talking
>> > about.
Sandy Mann - 31 Aug 2007 19:59 GMT
As I said, I have not been following this tread too closely and I had a
vague recollection that the OP talked about doing it on a monthly basis but
re-reading the original post I think that he only want a formula for daily
MPG. That being the case it simplifies it down to:
=IF(COUNTIF($B$4:B5,B5)<2,"",MAX(($B$4:B5=B5)*$C$4:C5)-MAX(($B$4:B4=B5)*$C$4:C4))
Array Entered for mileage since last refueling:
=IF(COUNTIF($B$4:B5,B5)<2,"",MAX(($B$4:B5=B5)*$A$4:A5)-MAX(($B$4:B4=B5)*$A$4:A4))
Array Entered or the number of days since last refueling and:
=IF(COUNTIF($B$4:B5,B5)<2,"",(MAX(($B$4:B5=B5)*$C$4:C5)-MAX(($B$4:B4=B5)*$C$4:C4))/(MAX(($B$4:B5=B5)*$A$4:A5)-MAX(($B$4:B4=B5)*$A$4:A4)))
again Array Entered for the average daily mileage since last refueling

Signature
HTH
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
sandymann2@mailinator.com
Replace @mailinator.com with @tiscali.co.uk
>I haven't been following this thread too closely but with the dates in
>Column A, truck registration in Column B and the odometer reading in Column
[quoted text clipped - 50 lines]
>>> > explained this enough that someone will understand what I'm talking
>>> > about.