sum between date values

  • Thread starter Thread starter Robbie
  • Start date Start date
R

Robbie

Good Day

I am currently using the below formula for min and max value by month(). I
would like to go a step further now and recover the sum value between
2 date values. ie. diesel used between January to April per vehicle

Appreciate the help
 
Try with your query dates in E1 and F1
E1 StartDate
F1 End Date
Change the reference to the truck number or reference to a acell

(all in one line)
=SUMPRODUCT(--(B2:B100="TruckReg"),--(A2:A100>=E1),--(A2:A100<=F1),D2:D100)

(Adjust the range as required)

If this post helps click Yes
 
Good Day Jacob

To workout the min and max in the same date range in order for me to work
out the km's done, would you agree with :

MAX(IF((A$1:A$100)<=F$1)*(B$1:B$100=F2),C$1:C$100))
Thanking you for your time
 
Close...try the below (again Array entered)
=MAX(IF((A$1:A$100<=F1)*(B$1:B$100=F2),C$1:C$100))

Good day Robbie...

If this post helps click Yes
 
Back
Top