Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# Using the lookup formula

Posted on 2014-12-21
Medium Priority
88 Views
1 Endorsement
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
1
Question by:frugalmule
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 3
• 2

LVL 47

Expert Comment

ID: 40512120
In cell V3, enter this formula...

=VLOOKUP(U3, Y:Z, 2, FALSE)
0

Author Comment

ID: 40512225
Thank you, can you explain the syntax?
0

LVL 47

Accepted Solution

Wayne Taylor (webtubbs) earned 2000 total points
ID: 40512258
The syntax for the function is VLOOKUP(lookup_value, table_array, col_index_num, range_lookup).

0

Author Comment

ID: 40513132
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

LVL 47

Expert Comment

ID: 40513893
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

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…