sum two criteria

S

Sonya

I am trying to get values for a date and journey, eg how many hours a lorry
took on a specific day in a specific place, both date and journey are in
separate columns with the values in a third. I have tride
if(sumif(Lorry:lorry, lorry,hours:hours),sumif(date:date,
date,hours:hours),0) but this does not bring up the correct values. Is there
another way?
 
J

JulieD

Hi Sonya

i'm hoping that Lorry & lorry & hours & date etc aren't range names ...

try
=SUMPRODUCT(($A$1:$A$100=E1)*($B$1:$B$100=E2)*($C$1:$C$100))

where
$A$1:$A$100 is the list of lorries and the actual lorry you're interested in
is entered in E1
$B$1:$B$100 is the list of trip dates and the actual date you're interested
in is entered in E2
$C$1:$C$100 is the list of "values" (hours?)

you can add more criterias as long as the range (e.g. D1:D100) is the same
size as the other ranges and you don't use wildcards in the criteria.

Hope this helps

Cheers
JulieD
 

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