"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 |
"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 |
"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 |
"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 |
"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 |
"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 |
All times are GMT +1. The time now is 07:32 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com