#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default vlookup

I am looking for a way to use vlookup to find data that is not a match but
will go the the next higher value.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default vlookup

rRichard,

This isn't clear. Suppose we have the data set

1 8
2 9
5 10
6 11
7 12
8 13

If we look up 5 in the first column what value do you want returned and why
ditto for looking up 3 in the first column

Mike

"Richard V" wrote:

I am looking for a way to use vlookup to find data that is not a match but
will go the the next higher value.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 222
Default vlookup

That's not an option in VLOOKUP, if you use FALSE as the final parameter, it
will find exact matches only, and if you use TRUE it will drop down to the
closest match. There isn't a round UP option.

But you could use an INDEX(MATCH) function and trick it into doing that, but
it might get weird when there IS an exact match.

If the data you want to return is in column B based on a lookup of a value
in column A and you want it to find the closest match and round up, you have
to offset the ranges by one row to trick it into doing that. I'm putting the
value to match in C1

=INDEX($B$2:$B$101,MATCH(C1,$A$1:$A$100,1))

That will do what you want when there ISN'T an exact match. If there is
won't get the right answer. So you probably need to do a test first.

=IF(ISNA(MATCH(C1,$A$1:$A$100,0)),
INDEX($B$2:$B$101,MATCH(C1,$A$1:$A$100,1)),
INDEX($B$1:$B$100,MATCH(C1,$A$1:$A$100,0)))

Hope that gets you closer.
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 222
Default INDEX(MATCH) clarification

Sorry, part of my message disappeared. I was saying that if the value you
want to match is an EXACT match in the lookup column, it would not give you
the correct answer, so the second longer formula should be used all the time
since it checks for an exact match before choosing which formula to use.

=IF(ISNA(MATCH(C1,$A$1:$A$100,0)),
INDEX($B$2:$B$101,MATCH(C1,$A$1:$A$100,1)),
INDEX($B$1:$B$100,MATCH(C1,$A$1:$A$100,0)))

--
"Actually, I *am* a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default vlookup

Hi,

Why don't you show us what your data looks like and what result you expect.

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Richard V" wrote:

I am looking for a way to use vlookup to find data that is not a match but
will go the the next higher 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
VLookUp - Does the VLookUp return the exact information? Cpviv Excel Worksheet Functions 2 October 28th 08 09:57 AM
Vlookup in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 AM
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
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 03:08 AM.

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"