counting cells

excelhelp12

New Member
Joined
Dec 3, 2009
Messages
9
Lets say column A has 10 values in A1:A10; 2 through 5.
Column B has 100 values in B1:B100; 1 through 100.

How do I count the cells in column B that are not in column A?
The answer would be 96.

what would the formula be ?? ? ?
 

Some videos you may like

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type

xld

Banned
Joined
Feb 8, 2003
Messages
5,378
Try

=SUMPRODUCT(--(ISNA(MATCH(B1:B100,A1:A10,0))))
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows

ADVERTISEMENT

=sumproduct(1-isnumber(match(b1:b100,a1:a10,0)))
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Should this be

ts say column A has 4 values in A1:A10; 2 through 5.

I just assumed there were duplicates in the range of 2 through 5
 

excelhelp12

New Member
Joined
Dec 3, 2009
Messages
9

ADVERTISEMENT

Say that column A has values: 1, 4, 11, 6
Say that column B has values: 1 through 100

I need a formula that counts the cells in column B that are not in column A. The answer should be 96.


I know it's not simply counta(B1:B100)-counta(A1:A4) because what if the values in column A were instead 2, 4, 12, 5. I think I need to search for the values and then subtract but how ? ? ? ??
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
2 solutions have been posted that give you the result you are looking for.
 

excelhelp12

New Member
Joined
Dec 3, 2009
Messages
9
yes i know 2 solutions were given but they don't search for values from column A and exclude them from the count in column B
 

Watch MrExcel Video

Forum statistics

Threads
1,122,657
Messages
5,597,391
Members
414,142
Latest member
Banyangt

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