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>

 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
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
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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?
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

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