If statement combined with VLOOKUP to return specific text?

kznadalin

New Member
Joined
Jun 16, 2010
Messages
35
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
 

Some videos you may like

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

admiral100

Well-known Member
Joined
Jan 17, 2015
Messages
873
Hi,

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

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,178
=IF(ISNUMBER(MATCH(A2,CBdistrict2!$A:$A,0)),"CBDistrict","Standard")

would be adequate for the job and fast.
 

Watch MrExcel Video

Forum statistics

Threads
1,099,463
Messages
5,468,791
Members
406,609
Latest member
cocobeans

This Week's Hot Topics

Top