PC Review Forums Newsgroups Microsoft Excel Microsoft Excel Setup Vlookup

Reply

Vlookup

 
Thread Tools Rate Thread
Old 04-10-2005, 04:49 PM   #1
=?Utf-8?B?TWluZGll?=
Guest
 
Posts: n/a
Default Vlookup


I have an excel document that I am looking up weights in a table. When I run
the macro I am always pulling the value that is less than the value that I
need. For example I have 903 as a weight and in the table I have 815 which
is 17.1 and 919 which is 18.3. I want to pull the 18.3, but I keep pulling
the 17.1. Is there a way to do this with the vlookup or is there another
formula that will grab the larger value?
  Reply With Quote
Old 04-10-2005, 06:26 PM   #2
George Nicholson
Guest
 
Posts: n/a
Default Re: Vlookup

When looking for approximate matches, VLookup will return the largest value
equal to or less than the value you are passing.
Perhaps you can rework your table to reflect this reality. Rather than a
"High value" table that you seem to have:
815 17.1
919 18.3
Rework it to something like the following "Low-High" table
low high value
712 815 17.1
816 919 18.3
Instruct Vlookup to find an approximate match in the 1st column and returns
a value from the 3rd column. The 2nd, "High", column is really only for the
convenience of human eyes. As far as Vlookup is concerned, it can be
omitted, but it might make life easier for the user if it wasn't.

HTH,
--
George Nicholson

Remove 'Junk' from return address.


"Mindie" <Mindie@discussions.microsoft.com> wrote in message
news:A5E43AE1-2D84-4B41-93EF-3E47F4B7DC49@microsoft.com...
>I have an excel document that I am looking up weights in a table. When I
>run
> the macro I am always pulling the value that is less than the value that I
> need. For example I have 903 as a weight and in the table I have 815
> which
> is 17.1 and 919 which is 18.3. I want to pull the 18.3, but I keep
> pulling
> the 17.1. Is there a way to do this with the vlookup or is there another
> formula that will grab the larger value?



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off