Multiple Data Validation - Add Two Together

tlc53

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

I have two data validations I would like to apply to cell F17.

The first one only allows number format of ### or ###/###. This code works fine;

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

The second data validation I would like to apply, is only allow F17 to be populated if B17 is not blank. This code work fine;

=LEN(B17)>0

Now I would like to combine these two data validations. I've tried but I'm not having much luck. Can anyone puzzle it together for me please? Thank you
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Try:

=AND(OR(AND(ISNUMBER(F17),LEN(F17)=3),AND(ISNUMBER(LEFT(F17,3)+0),ISNUMBER(RIGHT(F17,3)+0),MID(F17,4,1)="/",LEN(F17)=7)),LEN(B17))
 
Upvote 0

Forum statistics

Threads
1,223,711
Messages
6,174,025
Members
452,542
Latest member
Bricklin

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