Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default VLOOKUP FUNCTION

Is there a way to return the next largest value using a vlookup function when
an exact match is not found? As of now, it keeps returning the value that
matches or the next smallest value.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default VLOOKUP FUNCTION

An ugly one :
=IF(ISNA(VLOOKUP(C1,A1:B10,2,0)),INDEX(A1:B10,MATC H(C1,A1:A10,1)+1,2),VLOOKUP(C1,A1:B10,2,0))
Regards.
Daniel
"ashoulds" a écrit dans le message de
news: ...
Is there a way to return the next largest value using a vlookup function
when
an exact match is not found? As of now, it keeps returning the value that
matches or the next smallest value.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default VLOOKUP FUNCTION

Thank you so much. You rock! Now I think I have it all figured out!

"Daniel.C" wrote:

An ugly one :
=IF(ISNA(VLOOKUP(C1,A1:B10,2,0)),INDEX(A1:B10,MATC H(C1,A1:A10,1)+1,2),VLOOKUP(C1,A1:B10,2,0))
Regards.
Daniel
"ashoulds" a écrit dans le message de
news: ...
Is there a way to return the next largest value using a vlookup function
when
an exact match is not found? As of now, it keeps returning the value that
matches or the next smallest value.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default VLOOKUP FUNCTION

Can you use Match with a match type of -1? It will provide the position of
the next larger item as long as the table is sorted descending. Along the
lines of:
If IsError (Application.VLookUp(Mystrng, MyTable, MyCol, False)) Then
MyTable.Sort := xlDescending
MyPos = Application.Match(Mystrng, MyTable, -1)

MyPos would now equal the row within the table. From there you should be
able to get the cell address to reference from for your column offset.

Mike F

"ashoulds" wrote in message
...
Is there a way to return the next largest value using a vlookup function
when
an exact match is not found? As of now, it keeps returning the value that
matches or the next smallest value.



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
How to combine Combo Box function with Vlookup function KH Excel Worksheet Functions 2 April 5th 10 01:24 PM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
HOW DO I NEST THE VLOOKUP FUNCTION WITH THE LEFT FUNCTION CHAIM Excel Worksheet Functions 1 July 27th 05 09:10 PM
how do I write a vlookup function within an iserror function so t. JBLeeds Excel Worksheet Functions 2 March 16th 05 10:30 AM
I want to use Vlookup function and AND function in a single formu. prakash Excel Worksheet Functions 3 January 25th 05 07:11 AM


All times are GMT +1. The time now is 08:18 PM.

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"