# Using IF with COUNTIF

#### Rogojosh

##### New Member
Hi there, some wonderful people have helped me here before, so asking politely once again.

So I have a number of people who must take certain actions when they receive an email. Column one is peoples initials, column two are the actions. Eg. I want to search for HW, and count how many occurrences of 'Notification in, await report'. I'm trying: =IF('[Email Report.xlsx]RD '!\$G\$2:\$G\$71*("HW"),COUNTIF('[Email Report.xlsx]RD '!\$J\$2:\$J\$73,"Notification in, awaiting report")) There's clearly errors there so any help would be very much appreciated thank you.

### Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

#### GraH

##### Well-known Member
Perhaps try with countifs function. Similar to countif, but you can add more criteria or ifs.

#### Rogojosh

##### New Member
Perhaps try with countifs function. Similar to countif, but you can add more criteria or ifs.
Thanks GraH, I tried that but it counted how many times HW appeared, which I don't need. I just want to ask if it's HW, in the name column, then count how many whatever criteria ie actions. Also, in another tab that has no names, just actions, this works to count how many 'RD' are 'Open' =COUNTIF('[Email Report v1.xlsx]RD '!\$I\$2:\$I\$139,"Open") but if try that for another type of criteria, eg =COUNTIF('[Email Report v1.xlsx]RD '!\$I\$2:\$I\$139,"Notification In, Await Report") it isn't working. Perplexed. Thanks for your help.

Replies
3
Views
207
Replies
1
Views
291
Replies
0
Views
157
Replies
1
Views
391
Replies
5
Views
115