• 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 validqation using named range and fixed values

Jake Collins

Active Member
I would like for my data validation list to comprise both the values in a named range (called Names) and some fixed values ("role1","role2" and "role3").

I manage a conditional formatting check using

=IF(AND((COUNTIF(Names,B2)+IF(OR(B2="Role1",B2="Role2",B2="Role3"),1,0)=0,B2<>""),1,0)

Is there a way to get the data validation list to include the fixed values?
 
Try:
=OR(COUNTIF(Names,B2)>0,B2="Role1",B2="Role2",B2="Role3",B2="")
or try the shorter:
=OR(COUNTIF(Names,B2)>0,B2={"Role1","Role2","Role3",""})
but Excel may complain about using an array of constants; it did in Excel 2003.
 
What's stopping you from simply adding the fixed values to the top of the range that the Data Validation points at?
 
Back
Top