Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default "Custom" Data Validation

I want to be able to control a user's input to a couple of test words such
as "Yes" or "No" or a date. One of those 3 options and of course the dates
input would vary. Is this possible?

Thanks in advance


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default "Custom" Data Validation

Try this:

=OR(A1="Yes",A1="No",ISNUMBER(A1))

Note that a date is really just a number formatted to look like a date. So,
using the above a user could enter a 0 and it will be accepted. You could
refine the date requirement by allowing a range of dates and eliminate the 0
scenario. For example, allow dates from 1/1/2005 to 12/31/2010:

=OR(A1="Yes",A1="No",AND(A1=DATE(2005,1,1),A1<=DA TE(2010,12,31)))

--
Biff
Microsoft Excel MVP


"leimst" wrote in message
...
I want to be able to control a user's input to a couple of test words such
as "Yes" or "No" or a date. One of those 3 options and of course the dates
input would vary. Is this possible?

Thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default "Custom" Data Validation

Your multi-posting is terrible. The way to engage is to discuss things in
the same thread, not to keep flinging the same question several times. If
what I posted in response didn't work/doesn't appeal to you, just reply to
me in the thread. Other responders could always step in with other stuff for
you

Posted this response a couple of days ago
--------------------------------------------
Give this expression a try:
=OR(AND(ISTEXT(A1),OR(A1="No",A1="Yes")),AND(ISNUM BER(A1),CELL("format",A1)="d4"))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"leimst" wrote in message
...
I want to be able to control a user's input to a couple of test words such
as "Yes" or "No" or a date. One of those 3 options and of course the dates
input would vary. Is this possible?

Thanks in advance



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default "Custom" Data Validation

That worked great! I didn't know how to handle the date restriction so
thank you so much for the help!

Brian

"T. Valko" wrote in message
...
Try this:

=OR(A1="Yes",A1="No",ISNUMBER(A1))

Note that a date is really just a number formatted to look like a date.
So, using the above a user could enter a 0 and it will be accepted. You
could refine the date requirement by allowing a range of dates and
eliminate the 0 scenario. For example, allow dates from 1/1/2005 to
12/31/2010:

=OR(A1="Yes",A1="No",AND(A1=DATE(2005,1,1),A1<=DA TE(2010,12,31)))

--
Biff
Microsoft Excel MVP


"leimst" wrote in message
...
I want to be able to control a user's input to a couple of test words such
as "Yes" or "No" or a date. One of those 3 options and of course the
dates input would vary. Is this possible?

Thanks in advance





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 34
Default "Custom" Data Validation

I apologize for multi-posting but did not realize that I was doing that. As
a matter of fact, I have been trying to post that question since 6/8 and for
some reason I was never able to see my posting or any responses until today!
I never saw the response you provided.

Thanks for the heads up and I'll try to figure out what I might be doing
wrong!

Brian

"Max" wrote in message
...
Your multi-posting is terrible. The way to engage is to discuss things in
the same thread, not to keep flinging the same question several times. If
what I posted in response didn't work/doesn't appeal to you, just reply to
me in the thread. Other responders could always step in with other stuff
for you

Posted this response a couple of days ago
--------------------------------------------
Give this expression a try:
=OR(AND(ISTEXT(A1),OR(A1="No",A1="Yes")),AND(ISNUM BER(A1),CELL("format",A1)="d4"))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"leimst" wrote in message
...
I want to be able to control a user's input to a couple of test words such
as "Yes" or "No" or a date. One of those 3 options and of course the
dates input would vary. Is this possible?

Thanks in advance







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default "Custom" Data Validation

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"leimst" wrote in message
...
That worked great! I didn't know how to handle the date restriction so
thank you so much for the help!

Brian

"T. Valko" wrote in message
...
Try this:

=OR(A1="Yes",A1="No",ISNUMBER(A1))

Note that a date is really just a number formatted to look like a date.
So, using the above a user could enter a 0 and it will be accepted. You
could refine the date requirement by allowing a range of dates and
eliminate the 0 scenario. For example, allow dates from 1/1/2005 to
12/31/2010:

=OR(A1="Yes",A1="No",AND(A1=DATE(2005,1,1),A1<=DA TE(2010,12,31)))

--
Biff
Microsoft Excel MVP


"leimst" wrote in message
...
I want to be able to control a user's input to a couple of test words
such as "Yes" or "No" or a date. One of those 3 options and of course
the dates input would vary. Is this possible?

Thanks in advance







Reply
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
Validation ?:Accepting both Numbers AND specific letters("N","n"," Antonio Excel Discussion (Misc queries) 2 April 22nd 08 05:07 PM
Data validation - custom (must have "/") Johan[_2_] Excel Worksheet Functions 1 March 31st 08 04:33 PM
Custom Data Validation : Lock if MyCell = ""? RayportingMonkey Excel Worksheet Functions 5 October 25th 07 03:14 PM
Data Validation with "VBA Refreshing" out of order Marc Excel Discussion (Misc queries) 5 June 21st 06 07:01 PM
How can "data validation" be enforced in calculated cells NirA Excel Worksheet Functions 1 March 24th 06 06:13 PM


All times are GMT +1. The time now is 11:46 AM.

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

About Us

"It's about Microsoft Excel"