Data validation: want input restricted to date value or N/A

R

Rachel Garrett

I would like to use data validation to restrict cell input to either a
valid date after 1/1/08, or "N/A". This is the formula I'm starting
with:

=IF((D17="N/A"),TRUE,IF(D17>DATE(2008,1,1),TRUE,FALSE))

The problem is, if the user types anything in text (such as "Something
Else"), then Excel calculates the value of the text string is greater
than date(2008,1,1).

What do I need to do to allow only dates or the string "N/A"?

Thanks,
Rachel Garrett
 
R

Rick Rothstein \(MVP - VB\)

I think this Data Validation formula will do what you want...

=OR(D17="N/A",AND(ISNUMBER(D17),D17>DATE(2008,1,1)))

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top