# Using the lookup formula

I may even have the wrong formula but I need to accomplish the following goal which I think I have stated correctly based on the attached screenshot.

The original phone extension number (X1445) is noted in cell Y15 along with the correspnding cube number (cube 13) in cell Z15 .

If I enter enter X1445 into cell U3, then I want the adjacent cell V3 to populate with data from Z15.

Assistance is greatly appreciated.
temp.PNG
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
In cell V3, enter this formula...

=VLOOKUP(U3, Y:Z, 2, FALSE)
0
Author Commented:
Thank you, can you explain the syntax?
0
Commented:
The syntax for the function is VLOOKUP(lookup_value, table_array, col_index_num, range_lookup).

0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
Excellent, it does work but produces an error in the V column if there is no value yet in the adjacent U column.  It would be best if it did not show #N/A or produce an error, or a number until an extension number is actually entered in the U column.
0
Commented:
You can eliminate errors in one of 2 ways....

## 1. Using a Condition

=IF(U3="", "", VLOOKUP(U3, Y:Z, 2, FALSE))

This checks if cell U3 contains a value. If it doesn't, it returns an empty string. If it does, it returns the results of the VLOOKUP function. Note that this will still return an error if the value in cell U3 is not found.

## 2. Checking for Error

=IFERROR(VLOOKUP(U3, Y:Z, 2, FALSE), "")

This will return an empty string if the value of the VLOOKUP function is an error.

## 3. Combination

=IF(U3="", "", IFERROR(VLOOKUP(U3, Y:Z, 2, FALSE), ""))

This will return an empty string if the cell U3 is empty or the value cannot be found.
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.