View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary Gary is offline
external usenet poster
 
Posts: 273
Default VBA €“ Problem with compound SUMIF function

I am trying to select criteria from two columns and then do a sum on two
other columns. The first SUMIF works fine (with any single criteria) but I
am unable to add the second criteria. When I try, I get a €œtype mismatch€
error.

This works:
Total = SUMIF (Application.SUMIF (Range (€œL4:L500)", ItemEmp, Range
("M4:N500€))

This does not work:

Total = SUMIF (Application.SUMIF ( (Range (€œL4:L500") =ItemEmp) * (Range
(€œD4:D500") =ItemColor), Range ("M4:N500€))

Thanks,

gary