Match and count

fatnhappy

Board Regular
I have a set of data in C:4:C99. I have another set of data in C104:R104. I want to count the number of times the data in C104:R104 matches the data in C4:C99 and display that number

The data in C4:C99 can be duplicates
The data in C104:R104 is unique and is not duplicated in this range.

I am sure this is a simple sumproduct, I am just not sure of the syntax.

Thanks

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

Geoff H

Board Regular
Try this formula in C105 and drag to R105

=COUNTIF(\$C4:\$C99,C\$104)

dms37

Board Regular
There may well be a more "correct" way, but the below will work...

=SUMPRODUCT((C4:C99=C104:R104)*1)

Hope I understood what you meant.

Dave

fatnhappy

Board Regular
OK, neither of those is what I am looking for. Perhaps a visual will work better. I would like to have a formula that compares a4:a10 with a13:f13 and return the number of times A4:A10 matches a13:F13. The answer I am looking for here is 4.
Book1
ABCDEF
1
2
3
4red
5fucia
6green
7beige
8brown
9yellow
10red
11
12
13blueredyellowpurplegreenwhite
Sheet1

MrExcel MVP
=SUMPRODUCT(ISNUMBER(MATCH(\$A\$4:\$A\$10,\$A\$13:\$F\$13,0))+0)

fatnhappy

Board Regular
Thanks aladin - as always you are right. Sumproducts confuse me sometimes, thanks for making it work.

Replies
2
Views
202
Replies
10
Views
585
Replies
2
Views
42
Replies
4
Views
102
Replies
0
Views
83

1,127,339
Messages
5,624,101
Members
416,011
Latest member
chengkoonwing

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?

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

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