Count total Non matches in two ranges

drom

Well-known Member
Joined
Mar 20, 2005
Messages
528
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Hi and thanks in advance!

I have two tables in excel
  • Tb01
  • Tb02
I have 2 Columns Named in both tables
  • rcCodeTb01 'are Codes eg 5975, 0001, 75, 5987 So numbers
  • rcCodeTb02 'are Codes eg 5975, 9999, 123, 12, 98 So numbers
  • rcCodeTb01.Cells.count is 99% of the times <> than rcCodeTb02.Cells.Count
If I Use Conditional Cormatting within the table2 as follows
  • =Y(B5<>"",CONTAR.SI(rcCodeTb01,B5)=0) 'MyTable2.DatabodyRange stars in B5
    • I get 10 cells in Green Color​
How Can I get in a Formula in B2 = 10
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Perhaps this, Array confirmed with Shift Ctrl Enter? (untested)
Excel Formula:
=SUM(COUNTIF(rcCodeTb01,rcCodeTb02))-COUNTIF(rcCodeTb01,"<>")
 
Upvote 0
Solution
=SUMPRODUCT(--(rcCodeTb01<>""),--(COUNTIF(rcCodeTb02,rcCodeTb01)=0))
Does the same ! (y)
 
Upvote 0

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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