(Excel Data Validation) how can I apply data validation to restrict certain ages?

Viewed 32

I have a spreadsheet with DOB data. I am trying to implement data validation so people under age 18, or people 75 or older cannot enter their DOB. I can calculate their age using...

DATEIF(D2, TODAY(), "y"), which is in screenshot below attached...

enter image description here

But, how can I use this information to restrict the data input with data validation? I can't seem to implement the DATEDIF equation into a data validation rule.

Thanks for the help.

1 Answers

So, just to show it working:

enter image description here What makes it work is the absolute reference.

If I enter in cell D2 17.1.1940 it then asks to retry.

Note: I separated the two tests and the test in Data Validation is that both have to be true.

Related