Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 79
Default Finding Cell above Using Vlookup

Hi I am using vlookup to find a value based on a value that usually is not in
the lookup table. Vlookup always finds the next higher value but sometimes I
want the value in the lookup table that immediatley lower as it is closer to
the search value

The vlookup formula looks like this:

VLOOKUP(29.2522,Sal_Tables!$B$3:$D$7,NFPC!S2,TRUE)

the Values in the table:
27.5341
28.3499
29.2073
30.0927
31.4109

vlookup returns 30.0927 but I want 29.2073 as it is closer to the search
value and in about 2200 instances I need to coompare the table value found
and the table value immediately above it.

Thanks







  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,355
Default Finding Cell above Using Vlookup

You may need to use Match with Index to get what you want.
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Ralph" wrote:

Hi I am using vlookup to find a value based on a value that usually is not in
the lookup table. Vlookup always finds the next higher value but sometimes I
want the value in the lookup table that immediatley lower as it is closer to
the search value

The vlookup formula looks like this:

VLOOKUP(29.2522,Sal_Tables!$B$3:$D$7,NFPC!S2,TRUE)

the Values in the table:
27.5341
28.3499
29.2073
30.0927
31.4109

vlookup returns 30.0927 but I want 29.2073 as it is closer to the search
value and in about 2200 instances I need to coompare the table value found
and the table value immediately above it.

Thanks







  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Finding Cell above Using Vlookup

Assuming those values are in column A, then this formula:

=INDEX(A:A,MATCH(29.2522,A:A))

returns 29.2073 (as does your VLOOKUP), whereas this one:

=INDEX(A:A,MATCH(29.2522,A:A)-1)

returns 28.3499 (from the row above), and this:

=INDEX(A:A,MATCH(29.2522,A:A)+1)

returns 30.0927 (from the row below)

Hope this helps.

Pete


On Jan 14, 10:56*pm, Ralph wrote:
Hi I am using vlookup to find a value based on a value that usually is not in
the lookup table. Vlookup always finds the next higher value but sometimes I
want the value in the lookup table that immediatley lower as it is closer to
the search value

The vlookup formula looks like this:

VLOOKUP(29.2522,Sal_Tables!$B$3:$D$7,NFPC!S2,TRUE)

the Values in the table:
27.5341
28.3499
29.2073
30.0927
31.4109

vlookup returns 30.0927 but I want 29.2073 as it is closer to the search
value and in about 2200 instances I need to coompare the table value found
and the table value immediately above it.

Thanks


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
Vlookup not finding matches Andy Excel Worksheet Functions 7 January 25th 10 09:07 PM
Not finding matching value in vlookup JBS Excel Worksheet Functions 2 April 1st 08 08:13 PM
Finding a maximum with VLOOKUP Russ Excel Discussion (Misc queries) 8 August 17th 07 02:04 AM
Finding a vlookup table Purple Phil Excel Worksheet Functions 2 October 20th 06 07:35 PM
Using VLOOKUP after finding LARGE value Pierre Excel Worksheet Functions 5 July 26th 06 10:06 PM


All times are GMT +1. The time now is 05:49 PM.

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

About Us

"It's about Microsoft Excel"