Formula returns wrong count

CARBOB

Well-known Member
Joined
Jun 6, 2005
Messages
1,870
The formula in G2 returns the wrong count. I thought it had worked in other workbooks, the correct value should be 5.
Excel Workbook
ABCDEFG
303/05/1316243335362
403/04/131418203035
503/03/13613142427
603/02/13518232428
703/01/131316232527
802/28/1356172430
902/27/13412142535
1002/26/13919272932
1102/25/13521273435
1202/24/13319243235
1302/23/131326283133
1402/22/13922272931
1502/21/13313152833
1602/20/1323142433
1702/19/131025303536
1802/18/131315172024
Sheet1
Excel 2007
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
That formula counts the maximum number of times a number in any single row within B4:F18 match the numbers in B3:F3.... which is 2.

if you're looking for how many of the numbers in B3:F3 are matched in the range B4:F18, then use:

=SUMPRODUCT(--(COUNTIF(B4:F18,B3:F3)>0))
 
Upvote 0
That formula counts the maximum number of times a number in any single row within B4:F18 match the numbers in B3:F3.... which is 2.

if you're looking for how many of the numbers in B3:F3 are matched in the range B4:F18, then use:

=SUMPRODUCT(--(COUNTIF(B4:F18,B3:F3)>0))


thank you very much!!
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,216
Members
448,876
Latest member
Solitario

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