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:
but this returns a
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
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)
Code:
#VALUE!
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