require 9 digit input no duplicates

Alphazulu

Board Regular
Joined
Oct 16, 2003
Messages
121
I am trying to use data validation to restrict entry into a cell.

I want to make sure the entry is 9 digits and can not be repeated in cells cells B3 through B238.

So far =COUNTIF($B$3:$B$238,B8)=1 prevents the duplicate/repeated entry. How can I also require entry to be 9 digits?

Thanks
 

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
Hi -
I entered =and(len($b3)=9,countif($b$3:$b$238,b8)=1) in cell b3 through data validation and the cell still allows me to enter a number less than 9 digits long. Can you see where I missed something?

I used data->validation->settings->custom->formula and(len($b3)=9,countif($b$3:$b$238,b8)=1)

Thanks[/I]
 
Upvote 0
I think it should be
Rich (BB code):
=Len($B3)=9*COUNTIF($B$3:$B$238,B3)=1)

lenze
 
Upvote 0
when you select the area for the data validation, make sure you are on the first cell. So if you highlight column B then the formula has to be adjusted to this
=Len($B1)=9*COUNTIF($B$3:$B$238,B1)=1)

the way to double check this, is after you added the data validation; select a single cell and look at the data validation. The formula should show that cell range in the formula
 
Upvote 0

Forum statistics

Threads
1,222,041
Messages
6,163,556
Members
451,844
Latest member
ddnndd1234

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