sum between date values

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
 
J

Jacob Skaria

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
 
R

Robbie

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
 
J

Jacob Skaria

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
 

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