You are searching for information
in Excel from other table fields with
Vlookup and want to adapt it. You
often get error messages if the search
term is not present.
Here is an example for the
functioning and advantages of “Vlookup”.
For instance, you have a table that
records names and telephone numbers.
And if you include some of the names
elsewhere in the sheet then you can
enter the relevant number using the
“Vlookup” function. “Vlookup” will search
for the name accurately in the sheet. The
formula used is as follows:
=VLOOKUP(H2, A1:B16, 2, FALSE)
Here H2 is the name, A1:B16 is the table field, 2 is the column that contains the numbers, whereas false will search for the exact corresponding name. In case of success the formula outputs the relevant number in I6 or else it will show “#N/A”. This is not an error, as it means that the name is not present in the list. If you wish to change this output to “Not Present!” for your convenience, then you can easily do so. Using “IfError”, you can change the output message to let’s say “not present!”, with the help of the following formula.
=IFERROR(VLOOKUP(H6, A1:B16, 2, FALSE), "Not Present!")
=VLOOKUP(H2, A1:B16, 2, FALSE)
Here H2 is the name, A1:B16 is the table field, 2 is the column that contains the numbers, whereas false will search for the exact corresponding name. In case of success the formula outputs the relevant number in I6 or else it will show “#N/A”. This is not an error, as it means that the name is not present in the list. If you wish to change this output to “Not Present!” for your convenience, then you can easily do so. Using “IfError”, you can change the output message to let’s say “not present!”, with the help of the following formula.
=IFERROR(VLOOKUP(H6, A1:B16, 2, FALSE), "Not Present!")
0 comments:
Post a Comment
please write your comment
Note: Only a member of this blog may post a comment.