NumberCrunchingMonky
Technical User
I'm using SUMPRODUCT and need to exclude a particular variable from my SUMPRODUCT criteria. How do I do this?
For example, I have a table of all cities(col.A) in all states(col.B) in the US. There's also a field with the population of each state(col.C).
If I wanted to Sum the population of all cities in the state of California I would do something like this (given there are named ranges for "City", "State", "Population"
.
=SUMPRODUCT((State="California"
*(Population))
But what if I wanted to sum the population of the state of California, minus, say, San Francisco? Being there are too many cities in the state to specify in the formula individually I need to exclde "San Francisco" another way formulaically.
So, the formula couldn't look like this:
=SUMPRODUCT(((City="Alameida"
+(City="Sacramento"
+(City="Los Angeles"
+(etc.)+(etc.))*(State="California"
*(Population))
How do I do this?
Thank you.
Monky
For example, I have a table of all cities(col.A) in all states(col.B) in the US. There's also a field with the population of each state(col.C).
If I wanted to Sum the population of all cities in the state of California I would do something like this (given there are named ranges for "City", "State", "Population"
=SUMPRODUCT((State="California"
But what if I wanted to sum the population of the state of California, minus, say, San Francisco? Being there are too many cities in the state to specify in the formula individually I need to exclde "San Francisco" another way formulaically.
So, the formula couldn't look like this:
=SUMPRODUCT(((City="Alameida"
How do I do this?
Thank you.
Monky