COUNTIF - with more than one criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a spreadsheet with a table where I want to count - but I have 2
criterias. How can I use this function with more than one criteria?

The spreadsheet looks something like this:

A B
1 Place Type of course
2 Oslo Intro
3 Stavanger Intro
4 Stavanger Theme
5 Oslo Theme
6 Stavanger Intro
7 Stavanger Intro
8 Bergen Theme
9 Bergen Intro


.... and so on

I want to count ex:
Oslo with intro
Oslo with theme
Bergen with intro
Bergen with theme
Stavanger with intro
Stavanger with theme

How can I do this in this function, or are there any other functions that
can be used? I can do this by filtering in a list with subtotal, but then I
have to change the filter all the time.
 
Assume paired criteria listed in D2:E2 down
eg D2 = Oslo, E2 = Intro

Put in F2:
=SUMPRODUCT((A$2:A$100=D2)*(B$2:B$100=E2))
Copy down
 
Back
Top