View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
gerryR[_2_] gerryR[_2_] is offline
external usenet poster
 
Posts: 3
Default countif multiple conditions

Hi All

I'm trying to setup a formula which counts the amount of times 2 particular
conditions are true. From what I've read, =countif can only be used for
single conditions. I've tried some other options (see below) but all to no
avail. Below is an eg of what I'm trying to do.

Basically, I have a worksheet (A) with several coulms and 20000 rows.

John word
Mary excel
Ann excel
John word
Mary word
Ann excel

I then have another worksheet (B) with just a list of user names

John
Mary
Ann

What I want to do is count the amount of times each user has used each app.
So the final worksheet (B) would look like

word excel
John 2 0
Mary 1 1
Ann 0 2

As I say, my list of usernames is over 100 and the total rows is over 20000
so manual counting (even sorting my name) would be a chore. I also tried
the below formulae but it doesn't seem to work (found reference from the
web and adapted it to suit my needs but may have made a mistke?)

=SUM(IF($H2:$H4="John", IF($I2:$I4="word",1,0),0))

Apologies for the long post, if any one can point me in the right direction
I'd really appreciate it.
regards
Gerry