Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
djd djd is offline
external usenet poster
 
Posts: 11
Default Vlookup does not return approx match

I am having a problem where vlookup is not returning the next largest value
that is less than the lookup value for some reason. The key to the data is
a column that contains a concatenated key since the values I am trying to
match on are not in contiguous columns. The data is sorted in ascending
order.
Here is are the key values I am trying to searching on:

Location11
Location13
Location14
Location3
Location6
Location9

When I try to find Location12 using vlookup, I am expecting that it will
find Location11 but instead a 0 is returned.
I have used the IsNumber function to verify that the numbers are truly
numbers in the data table as well as in the values I am passing in the
vlookup statement.

Here is the vlookup statement: =VLOOKUP(J6&K6,RatesByLevel!A:H,7,TRUE)

I have used Trim on the contents of J6 to make sure there are no blanks as
well as the text values in the key data above.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Vlookup does not return approx match

It works ok for me. I'm assuming RatesByLevel column A has these entries in
order:

Location11
Location13
Location14
Location3
Location6
Location9


But, why concatenate the lookup_value?

Biff

"djd" wrote in message
...
I am having a problem where vlookup is not returning the next largest value
that is less than the lookup value for some reason. The key to the data
is
a column that contains a concatenated key since the values I am trying to
match on are not in contiguous columns. The data is sorted in ascending
order.
Here is are the key values I am trying to searching on:

Location11
Location13
Location14
Location3
Location6
Location9

When I try to find Location12 using vlookup, I am expecting that it will
find Location11 but instead a 0 is returned.
I have used the IsNumber function to verify that the numbers are truly
numbers in the data table as well as in the values I am passing in the
vlookup statement.

Here is the vlookup statement: =VLOOKUP(J6&K6,RatesByLevel!A:H,7,TRUE)

I have used Trim on the contents of J6 to make sure there are no blanks as
well as the text values in the key data above.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 623
Default Vlookup does not return approx match

It Vlookup returns 0, as opposed to #N/A, that means it found a match.

Your Vlookup asks for Column G of the row which has Location11. What's in column
G of that row? 0 or something else?

--
Regards,
Fred


"djd" wrote in message
...
I am having a problem where vlookup is not returning the next largest value
that is less than the lookup value for some reason. The key to the data is
a column that contains a concatenated key since the values I am trying to
match on are not in contiguous columns. The data is sorted in ascending
order.
Here is are the key values I am trying to searching on:

Location11
Location13
Location14
Location3
Location6
Location9

When I try to find Location12 using vlookup, I am expecting that it will
find Location11 but instead a 0 is returned.
I have used the IsNumber function to verify that the numbers are truly
numbers in the data table as well as in the values I am passing in the
vlookup statement.

Here is the vlookup statement: =VLOOKUP(J6&K6,RatesByLevel!A:H,7,TRUE)

I have used Trim on the contents of J6 to make sure there are no blanks as
well as the text values in the key data above.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
djd djd is offline
external usenet poster
 
Posts: 11
Default Vlookup does not return approx match

The data is coming from an external database so I don't have control over the
format coming from the source. I have two worksheets containing data from
different tables. The data is refreshed each time the workbook is opened.
The number concatenated to the "location" is a billing level. The billing
level is retrieved using a vlookup. The billing level retrieved is then
concatenated with the location selected by the user to retrieve the billing
rate.

As a test, I changed just the data to add the zero as you suggested and
resorted the data. So now the order is
Location03
Location06
Location09
Location11
Location13
Location14
vlookup of Location12 still returns zero.

"Teethless mama" wrote:

You have to change to two digit number
example: Location3 change to Location03 and so on...
then sort ascending order, then use your Vlookup formula.


"djd" wrote:

I am having a problem where vlookup is not returning the next largest value
that is less than the lookup value for some reason. The key to the data is
a column that contains a concatenated key since the values I am trying to
match on are not in contiguous columns. The data is sorted in ascending
order.
Here is are the key values I am trying to searching on:

Location11
Location13
Location14
Location3
Location6
Location9

When I try to find Location12 using vlookup, I am expecting that it will
find Location11 but instead a 0 is returned.
I have used the IsNumber function to verify that the numbers are truly
numbers in the data table as well as in the values I am passing in the
vlookup statement.

Here is the vlookup statement: =VLOOKUP(J6&K6,RatesByLevel!A:H,7,TRUE)

I have used Trim on the contents of J6 to make sure there are no blanks as
well as the text values in the key data above.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Vlookup does not return approx match

You have to change to two digit number
example: Location3 change to Location03 and so on...
then sort ascending order, then use your Vlookup formula.


"djd" wrote:

I am having a problem where vlookup is not returning the next largest value
that is less than the lookup value for some reason. The key to the data is
a column that contains a concatenated key since the values I am trying to
match on are not in contiguous columns. The data is sorted in ascending
order.
Here is are the key values I am trying to searching on:

Location11
Location13
Location14
Location3
Location6
Location9

When I try to find Location12 using vlookup, I am expecting that it will
find Location11 but instead a 0 is returned.
I have used the IsNumber function to verify that the numbers are truly
numbers in the data table as well as in the values I am passing in the
vlookup statement.

Here is the vlookup statement: =VLOOKUP(J6&K6,RatesByLevel!A:H,7,TRUE)

I have used Trim on the contents of J6 to make sure there are no blanks as
well as the text values in the key data above.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
djd djd is offline
external usenet poster
 
Posts: 11
Default Vlookup does not return approx match

Something else. Strange thing is that if I change the range lookup to False
and the Location & billing level matches what is in the table I get the
biling rate. If I change the range lookup to True and use the exact same
values I get a zero.


"Fred Smith" wrote:

It Vlookup returns 0, as opposed to #N/A, that means it found a match.

Your Vlookup asks for Column G of the row which has Location11. What's in column
G of that row? 0 or something else?

--
Regards,
Fred


"djd" wrote in message
...
I am having a problem where vlookup is not returning the next largest value
that is less than the lookup value for some reason. The key to the data is
a column that contains a concatenated key since the values I am trying to
match on are not in contiguous columns. The data is sorted in ascending
order.
Here is are the key values I am trying to searching on:

Location11
Location13
Location14
Location3
Location6
Location9

When I try to find Location12 using vlookup, I am expecting that it will
find Location11 but instead a 0 is returned.
I have used the IsNumber function to verify that the numbers are truly
numbers in the data table as well as in the values I am passing in the
vlookup statement.

Here is the vlookup statement: =VLOOKUP(J6&K6,RatesByLevel!A:H,7,TRUE)

I have used Trim on the contents of J6 to make sure there are no blanks as
well as the text values in the key data above.




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Vlookup does not return approx match

You have to change to two digit number
example: Location3 change to Location03 and so on...
then sort ascending order, then use your Vlookup formula.


No you don't!

Biff

"Teethless mama" wrote in message
...
You have to change to two digit number
example: Location3 change to Location03 and so on...
then sort ascending order, then use your Vlookup formula.


"djd" wrote:

I am having a problem where vlookup is not returning the next largest
value
that is less than the lookup value for some reason. The key to the data
is
a column that contains a concatenated key since the values I am trying to
match on are not in contiguous columns. The data is sorted in ascending
order.
Here is are the key values I am trying to searching on:

Location11
Location13
Location14
Location3
Location6
Location9

When I try to find Location12 using vlookup, I am expecting that it will
find Location11 but instead a 0 is returned.
I have used the IsNumber function to verify that the numbers are truly
numbers in the data table as well as in the values I am passing in the
vlookup statement.

Here is the vlookup statement: =VLOOKUP(J6&K6,RatesByLevel!A:H,7,TRUE)

I have used Trim on the contents of J6 to make sure there are no blanks
as
well as the text values in the key data above.



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Vlookup does not return approx match

You're probably getting 0 because your formula uses entire columns in the
lookup_table and you're picking up an empty cell at the very bottom of the
table. That's usually what happens (but not always) when you use TRUE as the
range_lookup argument and there is no "closest match".

Biff

"djd" wrote in message
...
Something else. Strange thing is that if I change the range lookup to
False
and the Location & billing level matches what is in the table I get the
biling rate. If I change the range lookup to True and use the exact same
values I get a zero.


"Fred Smith" wrote:

It Vlookup returns 0, as opposed to #N/A, that means it found a match.

Your Vlookup asks for Column G of the row which has Location11. What's in
column
G of that row? 0 or something else?

--
Regards,
Fred


"djd" wrote in message
...
I am having a problem where vlookup is not returning the next largest
value
that is less than the lookup value for some reason. The key to the
data is
a column that contains a concatenated key since the values I am trying
to
match on are not in contiguous columns. The data is sorted in
ascending
order.
Here is are the key values I am trying to searching on:

Location11
Location13
Location14
Location3
Location6
Location9

When I try to find Location12 using vlookup, I am expecting that it
will
find Location11 but instead a 0 is returned.
I have used the IsNumber function to verify that the numbers are truly
numbers in the data table as well as in the values I am passing in the
vlookup statement.

Here is the vlookup statement: =VLOOKUP(J6&K6,RatesByLevel!A:H,7,TRUE)

I have used Trim on the contents of J6 to make sure there are no blanks
as
well as the text values in the key data above.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing approx values Dono Excel Discussion (Misc queries) 0 September 28th 06 09:48 AM
put approx. 4 price list on i 1 piece paper with clip art marylou1 Setting up and Configuration of Excel 0 September 27th 06 10:19 AM
Return alternate value if VLookup can't find match SueJB Excel Worksheet Functions 7 January 5th 06 09:30 AM
match a name and return a tel number? Al Excel Discussion (Misc queries) 3 October 25th 05 04:10 PM
annual leave planner for approx 100 staff members wally Excel Discussion (Misc queries) 1 March 22nd 05 11:04 AM


All times are GMT +1. The time now is 04:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"