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

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

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,165
=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,095,185
Messages
5,442,887
Members
405,204
Latest member
warviksam

This Week's Hot Topics

  • Copy entire row if CountA <>0 to another sheet
    [B]I want to copy entire row if CountA <>0 for column J7:AM7 (headers on J6:AM6) and so on till the last used cell is column D and paste the...
  • Select last used Row in Table
    I have created a Table in a Worksheet which is locked to prevent user errors and protect formula. Some of the cells require freetext entries which...
  • excel workbook: do not allow certain file name
    Hello all, Don't think this has ever been asked before, but how do I restrict file save [Before_Save Event] if the name of the file being saved...
  • fixing problem autofilter
    hello i need help about my code when i search by code in textbox it doesn't show anything this is my data [ATTACH type="full"...
  • “Weight”
    Hi, i’ve got a long sheet filled with weights such as kg,g,L & ml. i can build a formula to convert kg into g and liter into ml. How ever, my...
  • How to capitalize everything before a certain character?
    In column A, I have some text: Hello good day.mp3 Hello good day.flac etc. I'd like to capitalize everything before the period. I don't need the...
Top