Question

I have a problem with vlookup. I doesn't recognize the right value.
I have a long column A with 36612 rows. In this column there are some regions of France. In column B (again with 36612 rows) I have a number. If I use vlookup it doesn't recognize the right value.
Here an example of my code where I am looking for the value in column B relatively to the regione Bretagne:

+VLOOKUP("bret",A:B;2).

I dont understand why it doesn't work sometimes...for some regions it works and for others not at all...Could it be because there are too many rows?

Was it helpful?

Solution

"bret" does not match "Bretagne". "bret" would occur before "Bretagne". So with your range_lookup argument being TRUE or omitted, assuming your list is sorted as it should be, I would expect VLOOKUP to return "the next largest value that is less than 'bret'", probably the preceding entry.

One way around the issue of doing partial matches in this situation would be to use FALSE for the range_lookup argument, AND use a wildcard with your Lookup_value. e.g:

=VLOOKUP("bret*",A:B,2,FALSE)
              ^

Please note that my separator is the comma -- may need to change that to semicolons for your locale.

OTHER TIPS

Normally, for an exact match, you need a 4th argument of FALSE in VLOOKUP, try this version

=VLOOKUP("bret";A:B;2;FALSE)

replace semi-colons with commas depending on your regional settings

In order to work values should be ordered in ascending order.

So the last argument should be 0 or false

+VLOOKUP("bret*",A:B;2;0)

And if the name is Bretagne use the * in order to use only "Bret" in the search

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top