View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default SUMIF Sum a column subject to variables in two columns

=sumproduct(A1:A50*(C1:C50="x")*(D1:D50="y")) or
=sumproduct(A1:A50,--(C1:C50="x"),--(D1:D50="y"))
--
David Biddulph

"Steve sivaD" wrote in message
...
Hi,

I already use the SUMIF function to calculate the total mileage for a
vehicle stored in columns A1:A50 if another column C1:C50 contains an 'x'.
However I now want to calculate the mileage if C1:C50 contains an 'x' and
column D1:D50 contains 'y'. I've looked at at various queries on this site
re
SUMIF with 2 variable but none seem to give an answer on how to nest these
two conditione into the 'CRITERIA' part of the function. Please can anyone
help?
--
Steve D