Data validation

Ymmirx

New Member
Joined
Sep 6, 2022
Messages
16
Office Version
  1. 365
Platform
  1. Windows
Hi Team,
I want to validate my inputs so no unnecessary data will be entered.
Please show me how.
  1. Date
  2. Rego# (eg:ABC123): 3x ALPHABET & 3x NUMERICALS
  3. Time Out & Time In.



DateRego#Driver NameType of VehicleTrip remarksLoad remarksDestinationTime OutMilage- OutTime InMilage- in
10-Oct-22​
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Like this?

Book1
ABC
1DateRego#Time
201/01/1950ABC15423:59
Sheet5
Cells with Data Validation
CellAllowCriteria
A2Datebetween 01/01/1950 and 01/01/2050
B2Custom=AND(ISNUMBER(SEARCH(MID(B2,ROW($1:$6),1),"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")),LEN(B2)=6)
C2Timebetween 00:00:01 and 23:59:59
 
Upvote 0
Like this?

Book1
ABC
1DateRego#Time
201/01/1950ABC15423:59
Sheet5
Cells with Data Validation
CellAllowCriteria
A2Datebetween 01/01/1950 and 01/01/2050
B2Custom=AND(ISNUMBER(SEARCH(MID(B2,ROW($1:$6),1),"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")),LEN(B2)=6)
C2Timebetween 00:00:01 and 23:59:59
Thank you so much.
 
Upvote 0
Thank you so much.
:unsure: Are you sure that is what you want?
The column B validation will allow any combination of letters and numbers of 6 characters (eg "ABCDEF", "12b4a6") not only
3x ALPHABET & 3x NUMERICALS
Assuming the 3 letters must come first (& be upper case) followed by 3 digits, you could try this as your B2 validation formula.

Excel Formula:
=AND(LEN(B2)=6,FIND(MID(B2,SEQUENCE(3),1),"ABCDEFGHIJKLMNOPQRSTUVWXYZ"),FIND(MID(B2,SEQUENCE(3,,4),1),"0123456789"))
 
Upvote 0

Forum statistics

Threads
1,224,738
Messages
6,180,673
Members
452,993
Latest member
FDARYABEE

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