View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default Can I use more complex logical expression for sumif as creteri

Hi!

Try this (using Marks example):

=SUMPRODUCT(--((A3:A10="MA")+(B3:B105000)0),F3:F10)

Biff

"xwenx" wrote in message
...
Thank you, Mark.
What if the condition is an "or" (not and). Either the first or the second
condition is met, then do the sum up...

"Mark Lincoln" wrote:

You can use SUMPRODUCT like this:

=SUMPRODUCT(--(A3:A10="MA"),--(B3:B105000),F3:F10)

Your state abbreviations are in A3:A10, your numbers to test on are in
B3:B10, and the numbers to sum are in F3:F10 (column 6). Change to
suit your circumstance.