LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Junior Member
 
Posts: 2
Default Data Validation help

Hello, I need help with a custom data validation formula for the following scenario:

Users can input an entry in any one of these formats (# for any number 0-9):
1) ##/##'
2) ###/###'
3) ##/###'
4) ###/##'

Here is the code I have that works for format 1 and 2.

=OR(AND(COUNT(MID(H1,ROW(INDIRECT("1:"&LEN(H1))),1 )+0)=4,MID(H1,3,1)="/",MID(H1,6,1)="'"),AND(COUNT(MID(H1,ROW(INDIRECT(" 1:"&LEN(H1))),1)+0)=6,MID(H1,4,1)="/",MID(H1,8,1)="'"))

Problem is, when I try to add more AND commands to include formats 3) and 4), excel does not allow it because it is too many characters. Is this possible?
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom data validation on cells with data validation values AKrobbins Excel Worksheet Functions 2 June 21st 11 04:20 PM
Data Validation - Validation list is larger than the cell width Barb Reinhardt Excel Programming 1 March 4th 10 08:24 PM
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
data validation invalid in dynamic validation list ilia Excel Worksheet Functions 0 November 7th 06 12:54 PM
Data validation with validation lists and combo boxs Keith Excel Discussion (Misc queries) 1 October 12th 06 11:08 AM


All times are GMT +1. The time now is 10:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"