Excel compare and return result

Closed
newbie881 Posts 2 Registration date Thursday July 12, 2018 Status Member Last seen July 12, 2018 - Updated on Jul 12, 2018 at 04:41 AM
Zohaib R Posts 2368 Registration date Sunday September 23, 2012 Status Member Last seen December 13, 2018 - Jul 16, 2018 at 01:37 PM
Hello,

I have a set of field to compare in 2 different spreadsheet out of which any match will then check and return for a specific value in another column.

E.g. Compare the name and if the role exist for the name, return yes. If not, return no.

Spreadsheet A:

Name Role
Mary Secretary
Mary HOD
Jane Secretary
Jane HOD
Jane Admin

Spreadsheet B:

Name Secretary Admin
Mary <Return Yes> <Return No>
Jane <Return Yes> <Return Yes>

How do I achieve the <Return Yes/No> part in Spreadsheet B?

Thanks!


Related:

2 responses

Zohaib R Posts 2368 Registration date Sunday September 23, 2012 Status Member Last seen December 13, 2018 69
Jul 12, 2018 at 12:27 PM
Hi newbie881,

One quick question: Mary and Jane are repeated in the first spreadsheet, does your data have repeated names like this?
0
newbie881 Posts 2 Registration date Thursday July 12, 2018 Status Member Last seen July 12, 2018
Jul 12, 2018 at 08:58 PM
Yes! 1 person is assigned to multiple roles.
0
Zohaib R Posts 2368 Registration date Sunday September 23, 2012 Status Member Last seen December 13, 2018 69
Jul 16, 2018 at 01:37 PM
Hi newbie881,

I am sorry for the delayed response, please check this formula - it should work:


Formula for Secretary Column: =IF(COUNTIFS([Book1]Sheet1!$B:$B,$B$1,[Book1]Sheet1!$A:$A,A2),"Yes","No")
Formula for Admin Column: =IF(COUNTIFS([Book1]Sheet1!$B:$B,$C$1,[Book1]Sheet1!$A:$A,A2),"Yes","No")

Please do write back to me, if you need any further clarification about these formulas.
0