Using COUNTIFS to match criteria in a range and also another cell

angeloudaki

New Member
Joined
Jul 7, 2015
Messages
46
Using cell references only, how would I count the number of times a value appears in a range and also matches another (fixed) criteria?

Example: I want to know how many times the value in H3 (table2) appears in table1range B2:D15 where their SS7 code is also the same as that in J1 (table2)

I used:
Code:
=COUNTIFS(C3:E16,H4,B3:B16,J2)
but this returns a
Code:
#VALUE!
error

Table1:
[TABLE="class: grid, width: 387"]
<colgroup><col><col><col span="3"></colgroup><tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Module[/TD]
[TD]Staff 1[/TD]
[TD]Staff 2[/TD]
[TD]Staff 3[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]SS7100[/TD]
[TD]PERSON1[/TD]
[TD]PERSON2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]SS7100[/TD]
[TD]PERSON3[/TD]
[TD]PERSON2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]SS7300[/TD]
[TD]PERSON3[/TD]
[TD]PERSON5[/TD]
[TD]PERSON6[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]SS7100[/TD]
[TD]PERSON4[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]SS7100[/TD]
[TD]PERSON2[/TD]
[TD]PERSON4[/TD]
[TD]PERSON6[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]SS7400[/TD]
[TD]PERSON2[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]SS7200[/TD]
[TD]PERSON3[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]SS7200[/TD]
[TD]PERSON1[/TD]
[TD]PERSON6[/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]


Table2
[TABLE="class: grid, width: 434"]
<colgroup><col><col><col span="4"></colgroup><tbody>[TR]
[TD][/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Name[/TD]
[TD]SS7100[/TD]
[TD]SS7200[/TD]
[TD]SS7300[/TD]
[TD]SS7400[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]PERSON0[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]PERSON1[/TD]
[TD] [/TD]
[TD] ???[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]PERSON3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]PERSON4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]

Thanks in advance!
Jen
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top