Possible Duplicate:

Count number of rows with conditions met in two columns

I have a table in Excel that looks like this:

```
A 1 2
B 2
A 1 2
C 3 1
D 1 3
A 1 4
```

In column A i have a set of words. Some of them are repeated. In columns E and F I have two other sets. Now I want to count all events where A is in column A and 1 is in column E or F.

I tried something like this

```
=COUNTIF(A1:A6, "A", E1:F6, "1")
```

Bu this does not work. Any hints to to solve the problem?