lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi I want to compare 2 tables to see who attended the conference/meeting.
So I used vlookup() but what I want to do, instead of Vlookup returning the name, I want vlookup returning "Attended"! How can I do that. I managed to do the "Not Attend" only
D2=IFERROR(VLOOKUP(A2,L:L,1,FALSE),"not attend")
[TABLE="width: 264"]
<colgroup><col span="3"><col></colgroup><tbody>[TR]
[TD]name[/TD]
[TD]dept[/TD]
[TD][/TD]
[TD]attending[/TD]
[/TR]
[TR]
[TD]john1[/TD]
[TD]it[/TD]
[TD][/TD]
[TD]john1[/TD]
[/TR]
[TR]
[TD]mary1[/TD]
[TD]hr[/TD]
[TD][/TD]
[TD]mary1[/TD]
[/TR]
[TR]
[TD]david1[/TD]
[TD]sales[/TD]
[TD][/TD]
[TD]not attend[/TD]
[/TR]
[TR]
[TD]sarah1[/TD]
[TD="colspan: 2"]marketing[/TD]
[TD]sarah1[/TD]
[/TR]
[TR]
[TD]alex1[/TD]
[TD]sales[/TD]
[TD][/TD]
[TD]not attend[/TD]
[/TR]
[TR]
[TD]anna1[/TD]
[TD]admin[/TD]
[TD][/TD]
[TD]anna1[/TD]
[/TR]
[TR]
[TD]lary1[/TD]
[TD]it[/TD]
[TD][/TD]
[TD]not attend[/TD]
[/TR]
</tbody>[/TABLE]
second table in column L
[TABLE="class: grid, width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]attended[/TD]
[/TR]
[TR]
[TD]andy1[/TD]
[/TR]
[TR]
[TD]mary1[/TD]
[/TR]
[TR]
[TD]nameir1[/TD]
[/TR]
[TR]
[TD]janet1[/TD]
[/TR]
[TR]
[TD]anna1[/TD]
[/TR]
[TR]
[TD]sarah1[/TD]
[/TR]
[TR]
[TD]kim1[/TD]
[/TR]
[TR]
[TD]andy2[/TD]
[/TR]
[TR]
[TD]john2[/TD]
[/TR]
[TR]
[TD]nameir2[/TD]
[/TR]
[TR]
[TD]janet2[/TD]
[/TR]
</tbody>[/TABLE]
So I used vlookup() but what I want to do, instead of Vlookup returning the name, I want vlookup returning "Attended"! How can I do that. I managed to do the "Not Attend" only
D2=IFERROR(VLOOKUP(A2,L:L,1,FALSE),"not attend")
[TABLE="width: 264"]
<colgroup><col span="3"><col></colgroup><tbody>[TR]
[TD]name[/TD]
[TD]dept[/TD]
[TD][/TD]
[TD]attending[/TD]
[/TR]
[TR]
[TD]john1[/TD]
[TD]it[/TD]
[TD][/TD]
[TD]john1[/TD]
[/TR]
[TR]
[TD]mary1[/TD]
[TD]hr[/TD]
[TD][/TD]
[TD]mary1[/TD]
[/TR]
[TR]
[TD]david1[/TD]
[TD]sales[/TD]
[TD][/TD]
[TD]not attend[/TD]
[/TR]
[TR]
[TD]sarah1[/TD]
[TD="colspan: 2"]marketing[/TD]
[TD]sarah1[/TD]
[/TR]
[TR]
[TD]alex1[/TD]
[TD]sales[/TD]
[TD][/TD]
[TD]not attend[/TD]
[/TR]
[TR]
[TD]anna1[/TD]
[TD]admin[/TD]
[TD][/TD]
[TD]anna1[/TD]
[/TR]
[TR]
[TD]lary1[/TD]
[TD]it[/TD]
[TD][/TD]
[TD]not attend[/TD]
[/TR]
</tbody>[/TABLE]
second table in column L
[TABLE="class: grid, width: 64"]
<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64"]attended[/TD]
[/TR]
[TR]
[TD]andy1[/TD]
[/TR]
[TR]
[TD]mary1[/TD]
[/TR]
[TR]
[TD]nameir1[/TD]
[/TR]
[TR]
[TD]janet1[/TD]
[/TR]
[TR]
[TD]anna1[/TD]
[/TR]
[TR]
[TD]sarah1[/TD]
[/TR]
[TR]
[TD]kim1[/TD]
[/TR]
[TR]
[TD]andy2[/TD]
[/TR]
[TR]
[TD]john2[/TD]
[/TR]
[TR]
[TD]nameir2[/TD]
[/TR]
[TR]
[TD]janet2[/TD]
[/TR]
</tbody>[/TABLE]