Code Bug Fix: VLOOKUP to compare two columns

Original Source Link

I am trying to use the result of vlookup and then evaluate the result of another column.
I have the following two tables:

Roster:

   ID  Current Employee
   12  Yes
   13  No 

TableB:

   ID  In Roster & Current Employee
   12  ?
   13  ? 

To make the check for if the employee is in Roster, I can do a simple Vlookup:
=IF(NOT(ISNA(VLOOKUP(A2,Roster!A:A,2,FALSE))),"Yes","No")
How do I check the two columns simultaneously to get the result of “In Roster & Current Employee”?

I find COUNTIFS easier here:

=IF(COUNTIFS(Roster!A:A,A2,Roster!B:B,"Yes")>0,"Yes","No")

Tagged : /

Leave a Reply

Your email address will not be published. Required fields are marked *