"Dean wants a quick way to look up staff members by their Staff ID. In cell Q3, nest the existing VLOOKUP function in an IFERROR function. If the VLOOKUP function returns an error result, the text ""Invalid Staff ID"" should be displayed by the formula. (Hint: You can test that this formula is working by changing the value in cell Q2 to 0, but remember to set the value of cell Q2 back to 1036 when the testing is complete.)"

Respuesta :

Answer:

ierror(VLOOKUP(Q2,CBFStaff[[Staff ID]:[Name]],2,FALSE), "Invalid Staff ID")

Explanation:

Let me try as much as I can to explain the concept or idea of iferror in vlookup.

iferror have a typically function and result like an if else statement, its syntax is IFERROR(value,value _ if _ error), this simply means that if the the error is equal to value, value is returned if not, the next argument is returned.

Having said that, feom the question we are given,

let's substitute the value with vlookup function and add an else argument, it will look exactly this way;

IFERROR(VLOOKUP(),"Invalid Staff ID")// now this will set the message if vlookup cannot find the.

On the other hand using the values given, we will have;

ierror(VLOOKUP(Q2,CBFStaff[[Staff ID]:[Name]],2,FALSE), "Invalid Staff ID")