If statement combined with VLOOKUP to return specific text?

kznmrexcel

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

I'm using a VLOOKUP to determine whether students are listed on a separate sheet which shows that they have a district laptop checked out to them. The VLOOKUP is working fine by itself:
<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Lucida Grande'}span.s1 {color: #0057d6}</style>=VLOOKUP(A2,CBdistrict2!$A:$E,5,FALSE)

However, I would like to have an IF statement that returns the text "CB District" if they are on this list, and the text "Standard" if the value is #N/A, meaning that they are NOT on this list. I'm not quite sure how to go about this. Any help is appreciated.

Thanks,
Karen
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hi,

Maybe this : =IF(ISNUMBER(IFERROR(VLOOKUP(A2,CBdistrict2!$A:$E,5,FALSE),"Standard")),"CB District","Standard")
 
Last edited:
Upvote 0
=IF(ISNUMBER(MATCH(A2,CBdistrict2!$A:$A,0)),"CBDistrict","Standard")

would be adequate for the job and fast.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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