Data validation - state characters allowed

tlc53

Active Member
Joined
Jul 26, 2018
Messages
399
Hi there,

Due to other formula's relating to the cell containing this data validation, I need to amend it slightly.

It currently looks like this;

=OR(AND(ISNUMBER(B13),LEN(B13)=3),AND(ISNUMBER(LEFT(B13,3)+0),ISNUMBER(RIGHT(B13,3)+0),ISNUMBER(SEARCH("/",B13)),LEN(B13)=7))

I would like to amend the first part, so that the first 3 characters can only be "0123456789". Basically, I'd like it to treat the first 3 characters as text but only allow numbers to be entered, no letters. I came up with this but it is not working as I would like.

=OR(AND(ISTEXT(B13),"012345689",LEN(B13)=3),AND(ISNUMBER(LEFT(B13,3)+0),ISNUMBER(RIGHT(B13,3)+0),ISNUMBER(SEARCH("/",B13)),LEN(B13)=7))

Can someone help me with this please? Thank you
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Try
=OR(AND(ISTEXT(B13),ISNUMBER(VALUE(B13)),LEN(B13)=3),AND(ISNUMBER(LEFT(B13,3)+0),ISNUMBER(RIGHT(B13,3)+0),ISNUMBER(SEARCH("/",B13)),LEN(B13)=7))
 
Upvote 0
Solution
One way to test if the first 3 characters are numbers

=ISNUMBER(VALUE(LEFT(B13,3)))
 
Upvote 0

Forum statistics

Threads
1,215,790
Messages
6,126,917
Members
449,348
Latest member
Rdeane

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