Match and count

fatnhappy

Board Regular
Joined
Nov 8, 2003
Messages
130
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
 

Some videos you may like

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
Joined
Aug 14, 2006
Messages
52
Try this formula in C105 and drag to R105

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

dms37

Board Regular
Joined
Nov 29, 2006
Messages
231
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
Joined
Nov 8, 2003
Messages
130
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
 

fatnhappy

Board Regular
Joined
Nov 8, 2003
Messages
130
Thanks aladin - as always you are right. Sumproducts confuse me sometimes, thanks for making it work.
 

Watch MrExcel Video

Forum statistics

Threads
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?

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