Solved

vlookup function assistance

Posted on 2012-03-19
6
1,558 Views
Last Modified: 2012-03-20
Dear experts,

I'm stuck trying to create a vlookup function which is not returned desired results.

Could I get some assistance to determine why the function is not returning the values I am looking for.   Please see attached and let me know if you have any question.

Thanks for your help!

lcha
VLOOKUP.xlsx
0
Comment
Question by:lcha
  • 3
  • 2
6 Comments
 

Author Comment

by:lcha
ID: 37740501
=VLOOKUP(H4,$C$4:$D$13,COLUMN(D4),FALSE)

I am searching for the value in H4, searching table array $c$4:$D$13, column(d4) is the value I want to retrieve, and false to search for an exact match.

i tried changing the FALSE value to TRUE (to search for the closest match), but get the same results.
0
 
LVL 4

Assisted Solution

by:ltsweb
ltsweb earned 450 total points
ID: 37740532
You want the formula:  =VLOOKUP(H4,C$4:D$13,2,FALSE)

This will return the Cust_Acct_Stat_Code based on the account number value.  For accounts that don't exist, it will return the value #N/A.

The first value is the lookup variable, second is the range, third is the column number, and fourth is whether you want an exact match.  Exact match is False.  Makes no sense, but hey, it is Microsoft, so it makes sense to someone!

Hope this helps!

Regards!
0
 

Author Comment

by:lcha
ID: 37740560
thank you so much for the quick reply.
 this worked for the sample spreadsheet I provided you however for some reason in the real spreadsheet doesn't work.

The value I am looking for (65001328 - value in cell I4) is in the array (see formula below).   Vlookup does a search for this value in column 1 of the array.   It's there, but the formula is still returning #N/A

=VLOOKUP(I4,$E$2:$F$1029,2,FALSE)

Any insights into what may be causing this issue?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 4

Accepted Solution

by:
ltsweb earned 450 total points
ID: 37740598
Hmm,
That is strange, that should work.

Do you have cells I4 and E4 the same data type, say number or text?

Try removing the $ in front of E and F - it shouldn't matter, but that is different than the sample spreadsheet.

Copy and paste a few of the lines from the "real" spreadsheet into a new spreadsheet and attach it.  Of course, remove anything that is confidential!

I think there may be something different between I4 the value you are matching in E4.  I noticed in your sample that account numbers 1-4 were not formatted as numeric.  If you see a green flag in the cell, convert the account to a number and it should work.  If it doesn't try converting it to text.
0
 
LVL 33

Assisted Solution

by:Rob Henson
Rob Henson earned 50 total points
ID: 37744114
As an aside, the reason why the COLUMN(D4) section wasn't working:

COLUMN(D4) will return the value 4 as D is the fourth column of the sheet and you are only looking for column 2 of the Array.

Thanks
Rob H
0
 

Author Closing Comment

by:lcha
ID: 37745374
Thanks all for your feedback and help on this issue!

One of the columns was General format and the other was text.

to fix it, I highlighted the column i needed to change format, went to "data", "text to columns", selected delimited, tab, and the general format.   This fixed the issue.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
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!
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question