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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
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,214,789
Messages
6,121,593
Members
449,038
Latest member
Arbind kumar

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