Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default vlookup - Multiple references

X | Y | Z
0 | 0 | Case 1
0 | 1 | Case 2
1 | 0 | Case 3
1 | 1 | Case 4

I would like to use a vlookup statement that will allow me to lookup the
values in x and y and return the value of z.

Thanks for your help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default vlookup - Multiple references

Sumproduct is probably what you are looking for.
--
JNW


"Elceller in distress" wrote:

X | Y | Z
0 | 0 | Case 1
0 | 1 | Case 2
1 | 0 | Case 3
1 | 1 | Case 4

I would like to use a vlookup statement that will allow me to lookup the
values in x and y and return the value of z.

Thanks for your help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default vlookup - Multiple references

I am sorry, I was not clear. I would like to type in a value for x and a
value for Y. I would like the program to determine z. If I type in 1 for x
and 0 for y, it should return the text case3.

Thanks for your help.

"JNW" wrote:

Sumproduct is probably what you are looking for.
--
JNW


"Elceller in distress" wrote:

X | Y | Z
0 | 0 | Case 1
0 | 1 | Case 2
1 | 0 | Case 3
1 | 1 | Case 4

I would like to use a vlookup statement that will allow me to lookup the
values in x and y and return the value of z.

Thanks for your help.

  #4   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default vlookup - Multiple references

How many different values are possible for X and Y?
--
JNW


"Elceller in distress" wrote:

I am sorry, I was not clear. I would like to type in a value for x and a
value for Y. I would like the program to determine z. If I type in 1 for x
and 0 for y, it should return the text case3.

Thanks for your help.

"JNW" wrote:

Sumproduct is probably what you are looking for.
--
JNW


"Elceller in distress" wrote:

X | Y | Z
0 | 0 | Case 1
0 | 1 | Case 2
1 | 0 | Case 3
1 | 1 | Case 4

I would like to use a vlookup statement that will allow me to lookup the
values in x and y and return the value of z.

Thanks for your help.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default vlookup - Multiple references

X Y Z
Apple Red Company1
Apple White Company2
Apple Blue Company3
Apple Green Company4
Apple Yellow Company5
pear Red Company1
pear White Company2
Pear Blue Company3

The actule table has 50 rows. I would like to type in a value for x and a
value for y and have the macro look up the x value, find the corresponding y
value and return the z value.

user input:
x= Apple
Y= Green

Output
z = Company4

"JNW" wrote:

How many different values are possible for X and Y?
--
JNW


"Elceller in distress" wrote:

I am sorry, I was not clear. I would like to type in a value for x and a
value for Y. I would like the program to determine z. If I type in 1 for x
and 0 for y, it should return the text case3.

Thanks for your help.

"JNW" wrote:

Sumproduct is probably what you are looking for.
--
JNW


"Elceller in distress" wrote:

X | Y | Z
0 | 0 | Case 1
0 | 1 | Case 2
1 | 0 | Case 3
1 | 1 | Case 4

I would like to use a vlookup statement that will allow me to lookup the
values in x and y and return the value of z.

Thanks for your help.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default vlookup - Multiple references

Saved from a previous post:

If you want exact matches for just two columns (and return a value from a
third), you could use:

=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 only use the whole column in xl2007.

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))

Elceller in distress wrote:

X Y Z
Apple Red Company1
Apple White Company2
Apple Blue Company3
Apple Green Company4
Apple Yellow Company5
pear Red Company1
pear White Company2
Pear Blue Company3

The actule table has 50 rows. I would like to type in a value for x and a
value for y and have the macro look up the x value, find the corresponding y
value and return the z value.

user input:
x= Apple
Y= Green

Output
z = Company4

"JNW" wrote:

How many different values are possible for X and Y?
--
JNW


"Elceller in distress" wrote:

I am sorry, I was not clear. I would like to type in a value for x and a
value for Y. I would like the program to determine z. If I type in 1 for x
and 0 for y, it should return the text case3.

Thanks for your help.

"JNW" wrote:

Sumproduct is probably what you are looking for.
--
JNW


"Elceller in distress" wrote:

X | Y | Z
0 | 0 | Case 1
0 | 1 | Case 2
1 | 0 | Case 3
1 | 1 | Case 4

I would like to use a vlookup statement that will allow me to lookup the
values in x and y and return the value of z.

Thanks for your help.


--

Dave Peterson
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 and combine all references BeckyB Excel Discussion (Misc queries) 2 March 26th 10 01:06 PM
Indirect references with VLOOKUP TQuestar New Users to Excel 5 January 26th 10 05:32 PM
Transposing Multiple Cell References to Multiple Values (NOT total LinLin Excel Discussion (Misc queries) 7 November 11th 07 10:57 PM
Transposing Multiple Cell references as Multiple Values LinLin Excel Discussion (Misc queries) 1 November 8th 07 01:21 AM
how do i use the vlookup with two references ? Vanessa Simmobds Excel Worksheet Functions 2 December 22nd 05 06:57 PM


All times are GMT +1. The time now is 11:54 PM.

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"