Thread: sumif
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.newusers
Sulasno[_2_] Sulasno[_2_] is offline
external usenet poster
 
Posts: 13
Default sumif

thanks
is there a limit to the number of criteria?

I presume that this will also work?
=SUMPRODUCT(($A$2:$A$7=A2)*($B$2:$B$7=B2)*($C$2:$C $7=C2)*($D$2:$D$7=D2),$E$2:$E$7)

"Don Guillett" wrote in message
...
Less resource use with sumproduct.
=SUMproduct(($A2:$A$7=A2)*($B$2:$B$7=B2),$E$2:$E$7 )


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Sulasno" wrote in message
...
thanks
finally got it right

{=SUM(IF(($A2:$A7=A2)*($B$2:$B$7=B2),$E$2:$E$7))}


"macropod" wrote in message
...
Hi Sulasno,

I assume you want to sum the data only where range1=criteria1 AND
range2=criteria2. SUMIF won't work with multiple conditions in that way.
For that you could use the SUMPRODUCT function (see the other replies),
or:
=SUM(IF((range1=criteria1)*((range2=criteria2),dat a))
as an array formula (entered with <Ctrl-<Shift-<Enter).

Note that both SUMPRODUCT and the array formula above require a
fully-qualified range - you can't use simple whole-column or whole-row
references (ie E:E or 3:3 won't work).

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Sulasno" wrote in message
...
still trying to find a way to use 2 criteria within 2 ranges to add 1
range of data;

range1 range2 criteria1 criteria2 data

=sumif(range1,criteria1,data)+sumif(range2,criteri a2,data) will give
twice the amount