I want to use the same function as SUMIF, but for two criterias

L

Lars F

Is it possible to sum one column based on two criterias, for example country
and type of store? I have done that for countires with SUMIF, but I now want
to have two parameters instead.
I would appreciate any help on this,
/Lars
 
D

DaveB

Lars -
Use SUMPRODUCT(...), assume your country names are in A1:A1000, your store
names are in B1:B1000 and the values you want to sum are in C1:C1000:

=SUMPRODUCT(--(A1:A1000="country name"),--(B1:B1000="store
type"),--(C1:C1000))
 
B

Bob Phillips

Dave,

The double unary is only required to coerce values to a number. If C1:C100
are already numbers it is not necessary, just

=SUMPRODUCT(--(A1:A1000="country name"),--(B1:B1000="store type"),C1:C1000)


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
W

William Horton

You can alway use the conditional sum wizard too. It is found via the Excel
menu path Tools / Wizard / Conditional Sum. It is an Excel add-in so you may
have to add it first. However, the SumProduct formula suggested by Dave and
Bob is more efficient. The Wizard is user/newbie friendly.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top