Count cells where content doesn't match a valid list elsewhere

H3MSY

Board Regular
Joined
Apr 29, 2002
Messages
69
Office Version
  1. 365
Platform
  1. Windows
Morning all, I have used the search function but cant find the answer i need...

I have a column (B:B) full of user input values that has data validation on it to only allow a user to select a value from "validation" list elsewhere in the Workbook. The problem is the user can still paste values from other places into the cells in B:B and this could be a value not within the "validation" list and we would never know.

I want to put a check within the workbook, that counts how many cells in B:B with a value have a value not listed in the validation list. - if its zero then all good, but if its 1 or above they need to run a check on B:B

Hopefully this makes sense and its something that can be done with a formula rather than vba
 

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.
I think i might have found a solution. I could use MATCH to count how many cells matched the validation list but i couldnt work out if there is a function is the reverse of MATCH ie Does not match.. so I've come up with this

=COUNTA(B:B)-COUNT(MATCH(B:B,validationlist,0))

probably a better way but this seems to work
 
Upvote 0
Try
Excel Formula:
=COUNTA(B:B)-sum(COUNTifs(B:B,validationlist))
 
Upvote 0

Forum statistics

Threads
1,215,108
Messages
6,123,129
Members
449,097
Latest member
mlckr

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