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

Perfect!

Thank you very much!


"Ron Coderre" wrote in message
...
I think a Pivot Table would be the least amount of work....

On Sheet_B:
<Data<Pivot Table
Use: Excel
Select your data from Sheet_A

Click the [Options] button
. For empty cells show: 0

Click the [Layout] button
. ROW: Drag the NAME field here
. COLUMN: Drag the APP field here
. DATA: Drag the APP field here
If it doesn't list as Count of APP...dbl-click it and set it to Count
. Click [OK]

Select where you want the Pivot Table...and you're done.

The end result will look like this:
Count of App App
Name excel word Grand Total
Ann 2 0 2
John 0 2 2
Mary 1 1 2
Grand Total 3 3 6


To refresh the Pivot Table, just right click it and select Refresh Data

If the data range will change regularly, base the Pivot Table on a Dynamic
Range Name, (which will automatically expand and contract to accommodate
the
data).
For instructions: http://www.contextures.com/xlNames01.html#Dynamic

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"gerryR" wrote:

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