Thread: Vlookup
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Vlookup

Saved from a few previous posts:

=index(othersheet!$c$1:$c$100,
match(1,(a2=othersheet!$a$1:$a$100)*(b2=othersheet !$b$1:$b$100),0))

(all in one cell)

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column.

This returns the value in othersheet column C when column A and B (of
othersheet) match A2 and B2 of the sheet with the formula.

And you can add more conditions by just adding more stuff to that product
portion of the formula:

=index(othersheet!$d$1:$d$100,
match(1,(a2=othersheet!$a$1:$a$100)
*(b2=othersheet!$b$1:$b$100)
*(c2=othersheet!$c$1:$c$100),0))

shaunap wrote:

Hi All,

I have a Vlookup formula that works fine. I would like to tweak it so that
it will look up the value based on conditions. I'm not sure if this can be
done or not so any help will be appreciated.

My data is 4 columns. I am searching column A and returning column C, but
would like for the formula to look at column D and if it sees a particular
value to continue to search the rest of the data for another exact match.

I hope this makes sense to somebody. Thank you in advance for your help.

Shauna


--

Dave Peterson