Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 90
  • Last Modified:

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
1
frugalmule
Asked:
frugalmule
  • 3
  • 2
1 Solution
 
Wayne Taylor (webtubbs)Commented:
In cell V3, enter this formula...

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

More info is available at http://office.microsoft.com/en-au/excel-help/vlookup-HP005209335.aspx
0
 
frugalmuleAuthor 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
 
Wayne Taylor (webtubbs)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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now