Compare a cell to a range of cells for a match

pigsfoot

Board Regular
Joined
Dec 13, 2007
Messages
58
Office Version
  1. 365
Hi,
We have an ANPR camera which provides an export of vehicle registration passing through our gate with the vehicle direction, i.e. In or Out.

All in bound vehicles are in column B and all outbound vehicles are in column H. If possible i would like a formula that checks all registrations in column B against all registrations in column H and tells me how many match.

I did try =If(B2=H2,"match","") but that obviously only checks the cells against each other on the same row, what i need is to chek B2 against the entire column H i.e. H2:H400. I did try to replace H2 with H2:h400 but got a weird error

Is this possible and if so coudl someone share the formula? Thanks
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
1. update your profile (Account details) about Excel version & OS
2. use XL2BB to post representative source data and expected result
 
Upvote 0
I used this formula in the end which seems to be working - =SUMPRODUCT(--(ISNUMBER(MATCH(B2:B400,H2:H400,0))))
 
Upvote 0

Forum statistics

Threads
1,214,567
Messages
6,120,268
Members
448,953
Latest member
Dutchie_1

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