List must only consists of specific value

I want to make an expression that gives me the following

{"a", "a", "a"} = TRUE (ie: every element in the list must be "a")

{"a", "a", "b"} = FALSE (contains something other than "a")

{"a", "b", "c"} = FALSE (contains something other than "a")

In other words, I want an expression that checks the list contains anything other than "a", then apply NOT() to the expression. I thought of NOT(CONTAINS(...)), but that is not correct. 

Solved Solved
0 2 58
1 ACCEPTED SOLUTION

https://support.google.com/appsheet/answer/10107963?sjid=12360751839617977796-AP

COUNT(INTERSECT({list},{list}) ) should return one if there is only one unique element and more than one otherwise.

View solution in original post

2 REPLIES 2

https://support.google.com/appsheet/answer/10107963?sjid=12360751839617977796-AP

COUNT(INTERSECT({list},{list}) ) should return one if there is only one unique element and more than one otherwise.

Thank you, this worked well. I further tightened the restriction with AND(...) to ensure that not only does the list contain only one type of element, it must also be specifically "a" and not "b" or "c",

Top Labels in this Space