ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   double or nested vlookup (https://www.excelbanter.com/excel-discussion-misc-queries/216279-double-nested-vlookup.html)

PaulaB

double or nested vlookup
 
Is there a way to look up not just one value, but two, in order to give an
output?
For example, column A has values A through D, repeated 5 times, and column B
has 1 through 10 repeated twice. Column C is the output value. How to I get
another worksheet to give me the value from C and 5 since Vlookup will only
find either C or 5?
--
Thanks,
Paula

Niek Otten

double or nested vlookup
 
Insert an extra column in which you concatenate A and B (=A1&B1).
Concatenate the search arguments too.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"PaulaB" wrote in message
...
Is there a way to look up not just one value, but two, in order to give an
output?
For example, column A has values A through D, repeated 5 times, and column
B
has 1 through 10 repeated twice. Column C is the output value. How to I
get
another worksheet to give me the value from C and 5 since Vlookup will
only
find either C or 5?
--
Thanks,
Paula



Pete_UK

double or nested vlookup
 
One way is to insert a new column C in your table and to concatenate
columns A and B together:

=A1&B1

Then your VLOOKUP can refer to column C as a unique reference, like
this:

=VLOOKUP(F1&G1,C:D,2,0)

assuming F1 contains "C" and G1 contains 5.

Hope this helps.

Pete

On Jan 13, 1:45*pm, PaulaB wrote:
Is there a way to look up not just one value, but two, in order to give an
output?
For example, column A has values A through D, repeated 5 times, and column B
has 1 through 10 repeated twice. *Column C is the output value. *How to I get
another worksheet to give me the value from C and 5 since Vlookup will only
find either C or 5?
--
Thanks,
Paula



JBeaucaire[_89_]

double or nested vlookup
 

=INDEX(C1:C20,MATCH("C5",A1:A20&B1:B20))

Confirm that formula with CTRL-SHIFT-ENTER to activate the array. You
will see braces appear around your formula { } and the formula should
return the value from cell C15.


--
JBeaucaire
------------------------------------------------------------------------
JBeaucaire's Profile: http://www.thecodecage.com/forumz/member.php?userid=73
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=49730


JBeaucaire[_85_]

double or nested vlookup
 
=INDEX(C1:C20,MATCH("C5",A1:A20&B1:B20))

Confirm that formula with CTRL-SHIFT-ENTER to activate the array. You will
see braces appear around your formula { } and the formula should return the
value from cell C15.

--
"Actually, I AM a rocket scientist." -- JB

Your feedback is appreciated, click YES if this post helped you.


"PaulaB" wrote:

Is there a way to look up not just one value, but two, in order to give an
output?
For example, column A has values A through D, repeated 5 times, and column B
has 1 through 10 repeated twice. Column C is the output value. How to I get
another worksheet to give me the value from C and 5 since Vlookup will only
find either C or 5?
--
Thanks,
Paula


Dave Peterson

double or nested vlookup
 
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))

PaulaB wrote:

Is there a way to look up not just one value, but two, in order to give an
output?
For example, column A has values A through D, repeated 5 times, and column B
has 1 through 10 repeated twice. Column C is the output value. How to I get
another worksheet to give me the value from C and 5 since Vlookup will only
find either C or 5?
--
Thanks,
Paula


--

Dave Peterson


All times are GMT +1. The time now is 06:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com