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? |
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" wrote in message ... 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? |
All times are GMT +1. The time now is 03:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com