Solved

vlookup function assistance

Posted on 2012-03-19
6
1,556 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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 32

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

832 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