# Way to count values which are present in another list

#### Sourav Das

##### New Member
How do I count a list of Values only which are present in another List?

For example:

 Value(to be counted) Value list 12 10 1 12 66 22 33 44 9 87 22 12

<tbody>
</tbody>

### Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

#### Trevor G

##### Well-known Member
Welcome to the forum, you should be able to use COUNTIF see example below:

Excel Workbook
ABC
1Value(to be counted)Value listCount
212100
31122
466221
533440
69870
7220
8120
Sheet1

#### Sourav Das

##### New Member
Thanks a Lot Trevor for the fast reply and warm welcome. But is there a way to combine the total no. of Counts in a single cell?

Welcome to the forum, you should be able to use COUNTIF see example below:

##### MrExcel MVP
1. control+shift+enter, not just enter:

=SUM(IF(ISNUMBER(MATCH(A2:A8,B2:B6,0)),1))

2. Just enter:

=SUMPRODUCT((ISNUMBER(MATCH(A2:A8,B2:B6,0))+0)

3. Just enter:

=SUMPRODUCT(COUNTIFS(A2:A8,B2:B6))

The last one is the least efficient.

#### Sourav Das

##### New Member
Thanks a million Aladin bro. This works just fine.

I would request another additional feature to this. If the value is Greater than or equal to 22 or Cell no. B4, how would I count that in addition to the factors already taken under consideration.

1. control+shift+enter, not just enter:

=SUM(IF(ISNUMBER(MATCH(A2:A8,B2:B6,0)),1))

2. Just enter:

=SUMPRODUCT((ISNUMBER(MATCH(A2:A8,B2:B6,0))+0)

3. Just enter:

=SUMPRODUCT(COUNTIFS(A2:A8,B2:B6))

The last one is the least efficient.

##### MrExcel MVP
Thanks a million Aladin bro. This works just fine.

I would request another additional feature to this. If the value is Greater than or equal to 22 or Cell no. B4, how would I count that in addition to the factors already taken under consideration.

Do you mean...

=SUM(IF(ISNUMBER(MATCH(IF(A2:A8>=22,A2:A8),B2:B6,0)),1))

which must be confirmed with control+shift+enter, not just enter?

Replies
3
Views
130
Replies
0
Views
121
Replies
7
Views
193
Replies
2
Views
77
Replies
9
Views
146

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,163,784
Messages
5,833,682
Members
430,222
Latest member
Nickkarl

### 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.

### Which adblocker are you using?

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

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