Way to count values which are present in another list

Sourav Das

New Member
Joined
Jun 20, 2015
Messages
3
How do I count a list of Values only which are present in another List?

For example:

Value(to be counted)Value list
1210
112
6622
3344
987
22
12

<tbody>
</tbody>

 

Some videos you may like

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Trevor G

Well-known Member
Joined
Jul 17, 2008
Messages
6,701
Office Version
  1. 2016
Platform
  1. Windows
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
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
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
Joined
Jun 20, 2015
Messages
3
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.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,201
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?
 

Watch MrExcel Video

Forum statistics

Threads
1,122,721
Messages
5,597,752
Members
414,171
Latest member
12Rev79

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
Top