In this example we'll be using three excel functions such as IFERROR, IFand VLOOKUP functions.
=IFERROR(IF(G3="","",VLOOKUP(G3,Sheet1!B:C,2,FALSE)), "No Match Found")
For this example, we'll use the above formula at Cell "G4":
Initially, the formula says that if the value of G3 is blank then set the value of G4 to blank. Otherwise, look for the lookup value (ID) in the table array and return the exact match in the second column (Name) . If the value is not found in the array then return a message to the user.
- IFERROR('Formula to Evaluate', value-if-error) - Returns the specified value "No Match Found" if the formula evaluated returns an error value.
- IF(logical_test, [value_if_true], [value_if_false]) - Logic test is a comparison between two values (G3=""), test's if the value of G3 is empty. Followed by two arguments which are the value_if_true and value_if_false. If the value of G3 is equal to blank then do nothing or set the Cell's value to blank. While, if the value if G3 is not equal to blank then evaluate the next function.
- VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) - Looks up the value of G3 in the table array Sheet1!B:C and return the value of the exact match from the column 2.
Post a Comment