IF(ISNA...) with VLOOKUP on another worksheet to return "M" if not present on other worksheet?

kznmrexcel

Board Regular
Joined
Jun 16, 2010
Messages
86
Office Version
  1. 2016
Platform
  1. MacOS
Hi, everyone,

I have two worksheets with a list of students on each one, "lib_checkin" and "lib_hah." Only some of the students on "lib_checkin" are listed on "lib_hah," along with the period that they have a class.

If they ARE listed on "lib_hah," I want to return the value of what period that they are in class on the "lib_checkin" sheet, which is currently working.
If they are NOT listed on "lib_hah," I would like to get the result returned as just the letter M, but right now, I'm getting #NAME? instead.

<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Lucida Grande'; color: #000000}span.s1 {color: #006107}span.s2 {color: #ab30d6}span.s3 {color: #0057d6}</style>=IF(ISNA(VLOOKUP(A15,lib_hah!$A:$G,5,0)),”M”,VLOOKUP(A15,lib_hah!$A:$G,5,0))


Any help is appreciated.
Thanks,
Karen
 
Last edited:

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
If you are using Excel 2013 (I think) or later, you can write that formula more simply as:

=IFNA(VLOOKUP(A15,lib_hah!$A:$G,5,0),"M")


For some older versions you could also use this unless it is specifically #N/A errors that you are trying to trap

=IFERROR(VLOOKUP(A15,lib_hah!$A:$G,5,0),"M")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,246
Members
452,623
Latest member
cliftonhandyman

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