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:
ABCD
1ModuleStaff 1Staff 2Staff 3
2SS7100PERSON1PERSON2
3SS7100PERSON3PERSON2
4SS7300PERSON3PERSON5PERSON6
5SS7100PERSON4
6SS7100PERSON2PERSON4PERSON6
7SS7400PERSON2
8SS7200PERSON3
9SS7200PERSON1PERSON6

<colgroup><col><col><col span="3"></colgroup><tbody>
</tbody>


Table2
HIJKL
1NameSS7100SS7200SS7300SS7400
2PERSON0
3PERSON1 ???
4PERSON3
5PERSON4

<colgroup><col><col><col span="4"></colgroup><tbody>
</tbody>

Thanks in advance!
Jen
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,215,857
Messages
6,127,372
Members
449,381
Latest member
Aircuart

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