Validation

rhmkrmi

Active Member
Joined
Aug 17, 2012
Messages
348
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am trying to create a validation for a specific syntax.

Example: BP:402865


The BP: is fixed but the 6-digit number varies.

Could you please help with a formula that I can use in the validation?


Thank you
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I thought of that but what if the user enters BP: 502479?
The should be no space between the colon and the number.

Thanks
 
Upvote 0
Not totally foolproof, but how about
=AND(LEFT(A2,3)="BP:",LEN(A2)=9,ISNUMBER(--RIGHT(A2,6)))
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
Is it possible to have more than one data validation in a cell as formula?

I am trying to use custom data validation for one cell with both of:

=AND(NOT(EXACT(G38,LOWER(G38))),NOT(EXACT(G38,UPPER(G38))),ISERROR(SEARCH("–",G38,1)),R38="School")
=AND(EXACT(G39,UPPER(G39)),ISERROR(SEARCH("–",G39,1)),R39="Home")

Thank you.
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,223,744
Messages
6,174,252
Members
452,553
Latest member
red83

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