Problem with Vlookup function

judybrownboyd

New Member
Joined
Aug 22, 2002
Messages
3
I have created a rather large vlookup table.
I am using numbers and letters in the table
l,1a,1b,1c,2,2a......etc. When I get to 10a
it won't work. I get an error message. What are the parameters for a vlookup table?
I can't find detailed information anywhere.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
You need to alter your VLOOKUP function. Your data needs to be sorted ascending if you use VLOOKUP as you have. The problem is the way that Excel looks things up. Use the following:

=IF(Y7="","",VLOOKUP(Y7,MAppB!$A$1:$I$100,2,0))

This forces Excel to look for an exact match. Without it, it assumes that the data is sorted. To be sorted you would need the records in the following order:

1,10,10a,10b,10c,1a,1b,1c,2,2a, etc.

HTH
Seti
 
Upvote 0
I was just about to post the same thing, but did a topic review and saw that Seti is TOO fast for me.
 
Upvote 0
Judy, from the help files...

VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)

Lookup_value is the value to be found in the first column of the array. Lookup_value can be a value, a reference, or a text string.

Table_array is the table of information in which data is looked up. Use a reference to a range or a range name, such as Database or List.

If range_lookup is TRUE, the values in the first column of table_array must be placed in ascending order: ..., -2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE; otherwise VLOOKUP may not give the correct value. If range_lookup is FALSE, table_array does not need to be sorted.


You can put the values in ascending order by choosing the Sort command from the Data menu and selecting Ascending.


The values in the first column of table_array can be text, numbers, or logical values.


Uppercase and lowercase text are equivalent


You might try changing range_lookup to false or sort the list in ascending order. When numbers and text are combined, 10a is actually smaller than 1a.

If you need the list/table that you are looking up from in a particular order, then change the last parameter to false - meaning Find me an exact match, not the closest match without going over the value.

HTH, Regards
Tom
 
Upvote 0

Forum statistics

Threads
1,218,620
Messages
6,143,520
Members
450,492
Latest member
Rusbus1972

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top