223k views
2 votes
8. Lael wants a quick way to look up students by their Student ID.

In cell Q3, nest the existing VLOOKUP function in an IFERROR function. If the VLOOKUP function returns an error result, the text Invalid Student ID should display.

1 Answer

1 vote

Answer:

IFERROR(VLOOKUP(Q2,A2:N31,2,FALSE),"Invalid Student ID")

Step-by-step explanation:

The VLOOKUP function is expresses using the syntax :

=VLOOKUP(value, table array, col_index, range lookup value)

Using the IFERROR function with the VLOOKUP :

IFERROR(VLOOKUP(Q2,A2:N31,2,FALSE),"Invalid Student ID")

The VLOOKUP function here is nested with an IFERROR function is used to avoid our calculation or output resulting or showing an error and instead of throwing an error, output a statement which is defined by the user.

Here, the IFERROR function here takes the VLOOKUP function defined as its first argument, the second argument will be the output if the VLOOKUP function fails to find a match

User Farouk M
by
4.4k points