Reputation: 27
So some agency want to know how many users are allowed to get into their system they send me all users that are allowed, now i want match every user with their data, if the user exit in their column then write "TRUE" if not "FALSE"? Thank you.
Names | Agency1 | Allowed? |
---|---|---|
user565 | user44 | FALSE |
user4851 | user4 | TRUE |
user548 | user3 | FALSE |
user4 | user884 | FALSE |
Upvotes: 0
Views: 83
Reputation: 12823
Another alternative is to use COUNTIF.
=ArrayFormula(countif(A2:A5,B2:B5)>0)
Upvotes: 1
Reputation: 1193
You should be able to accomplish this using MATCH. Something like:
MATCH(C2,B$2:B)
Note that I am using B$2
here. This means that when you copy this formula to each row, it will continue to look at all of the values in xolumb B
. So this is only the formula for the first row.
If MATCH does not find the result, it will return #N/A
. This can be handled with IFNA:
IFNA(MATCH(C2, B$2:B), FALSE)
This will return FALSE if the MATCH returns #N/A
Now, to get your TRUE/FALSE value, you need to do a comparison of the above:
IF(IFNA(MATCH(C2, B$2:B), FALSE), TRUE, FALSE)
Upvotes: 3