Smi28
Smi28

Reputation: 57

VLOOKUP to compare two columns

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"?

Upvotes: 0

Views: 189

Answers (1)

BigBen
BigBen

Reputation: 49998

I find COUNTIFS easier here:

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

Upvotes: 2

Related Questions