controlling the return text from Vlookup()

lezawang

Well-known Member
Joined
Mar 27, 2016
Messages
1,805
Office Version
  1. 2016
Platform
  1. 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")

namedeptattending
john1itjohn1
mary1hrmary1
david1salesnot attend
sarah1marketingsarah1
alex1salesnot attend
anna1adminanna1
lary1itnot attend

<colgroup><col span="3"><col></colgroup><tbody>
</tbody>

second table in column L

attended
andy1
mary1
nameir1
janet1
anna1
sarah1
kim1
andy2
john2
nameir2
janet2

<colgroup><col width="64" style="width:48pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
I'd suggest something like this:

=IF(ISNA(VLOOKUP(A2,L:L,1,FALSE)),"not attend","Attend")
 
Upvote 0
try

=IF(ISERROR(VLOOKUP(A2,L:L,1,FALSE)),"not attend","attended")
 
Last edited:
Upvote 0
How about
=IF(ISNA(VLOOKUP(A2,L:L,1,FALSE)),"not attend","attended")
 
Upvote 0
Thank you all. It works! amazing really. Thank you
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,215,475
Messages
6,125,028
Members
449,205
Latest member
Eggy66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top