• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Data validation using VBA function

cricketnz

New Member
Hi,

I want to make sure that in cell K2 (part of an Excel 2010 database column, called "Accepted") only dates can be entered or the words "Declined" or "Withdrawn"
I set up a Function in VBA called "idate" which returns true if the parametercell referenced is a date.
My validation formula is =OR(idate(K2),(K2="Declined"),(K2="Withdrawn"))
However when I try to enter this formula I get a message "A named range you specified cannot be found".
What am I doing wrong.
When I test the idate function separately it works correctly. When I test the above formula in a sheet it also works correctly.
When used as a validation, do I need to enter it differently?

Many thanks for your help in advance
 
Back
Top