Worksheet Function

J

JeremyH1982

Hello everyone,

This is what I would like to do...

Column E contains dates, that the order has been taken.
Column D contains the pairs that were sold.

I would like to add up just the orders that were sold in 07, in comparison
to 06.

What formula would I use??

I'm assuming it's an IF statement. If the order wasn't placed in 07, i don't
want them to be in the total.
 
T

Trevor Shuttleworth

Jeremy

=SUMPRODUCT((YEAR(E1:E6)=2007)*(D1:D6))

Adjust the range as required. Note that it cannot be a full column and the
ranges should match.

Regards

Trevor
 
J

JeremyH1982

That would work... but the dates are different, it's not all the same format...

examples: one order could be dated 09/20/07, another one could be 4/27/07
 
P

Peo Sjoblom

Did you try the formula? It will sum all entries for 2007 like you stated in
your OP, do the same for 2006 and you'll get your comparison
 
Top