View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default help with vlookup and return based on a formula

Assuming your data in A2:C6
Criteria in D2: holds metal, E2 holds size

In F2:
=INDEX(A2:C6,MATCH(D2,A2:A6,0),MIN(IF(RIGHT(B2:C6, LEN(B2:C6)-FIND("x",B2:C6))+0=E2,COLUMN(B2:C6))))

ctrl+shift+enter, not just enter


"laurakberg" wrote:

Hello!
I am working with sheet metal. For any given metal, I have various sizes
available. I want to use vlookup my metal and then return the appropriate
size based on the length of the part I need to take out of it.
Example, my table looks like:
METAL SIZE1 SIZE2
Stainless 36x90 48x120
PlainSteel 40x90 60x120
And the part I am building is using Stainless with a length of 80". So
using the table, I want to lookup "stainless", and my formula answer would be
"36x90" because that would fit my 80" part.
I know how to set up vlookup, but I don't know how to incorporate a formula
to assess my part length versus my sheet lengths available. Anyone know?
Thanks for the help--laura