Can you nest a SUMIF function?

  • Thread starter Thread starter Sho
  • Start date Start date
S

Sho

I have the following formula

=sumif(b3:b7,"London",c3:c7)

I want to be able to sum based on different possibilities
so I tried the following formula but it did not work.

=sumif(b3:b7,"London",c3:c7,sumif
(b3:b7,"Manchester",E3:E7,sumif(b3:b7,"Aberdeen",D3:D7)))

Is it possible to nest SUMIF - or is there another way of
doing this? The problem is that what I wish to sum changes
depending on the criteria.

Any help would be great!
 
Hi
not possible with SUMIF (besides simply adding 3 SUMIF
statements) like
=SUMIF(b3:b7,"London",c3:c7)+SUMIF
(b3:b7,"Manchester",E3:E7)+SUMIF(b3:b7,"Aberdeen",D3:D7)
 
not possible with SUMIF (besides simply adding 3 SUMIF
statements) like
=SUMIF(b3:b7,"London",c3:c7)+SUMIF(b3:b7,"Manchester",E3:E7)
+SUMIF(b3:b7,"Aberdeen",D3:D7)
...

Since these criteria would be mutually exclusive (two or more could not be
satisfied in each row), this could be calculated using only 1 function call.

=SUMPRODUCT(--(B3:B7={"London","Aberdeen","Manchester"}),C3:E7)
 
Back
Top