ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Lookup value based on 2 cell values (https://www.excelbanter.com/excel-worksheet-functions/219577-lookup-value-based-2-cell-values.html)

BorderMaster

Lookup value based on 2 cell values
 
Hello all,

I am trying to find a way to search through a table the value based on
2 other cells. The 2 base cells have 9 and 10 different possibilities
respectively so this gives me a table with 90 options. How can I do
this? My first thought was something like this:

=IF(A1="LCT";VLOOKUP(B1;D1:M9;2);IF(A1="LCB";VLOOK UP(B1;D1:M9;3);...)

The problem is that I have more than 7 "IF" and I cannot do this in
Excel 2K3.

Can someone help me? I would like to be able to grow the table as
needed.

Thanks in advance.

Teethless mama

Lookup value based on 2 cell values
 
Try this:

=VLOOKUP(B1,D1:M9,MATCH(A1,{"LCT","LCB"},)+1,)



"BorderMaster" wrote:

Hello all,

I am trying to find a way to search through a table the value based on
2 other cells. The 2 base cells have 9 and 10 different possibilities
respectively so this gives me a table with 90 options. How can I do
this? My first thought was something like this:

=IF(A1="LCT";VLOOKUP(B1;D1:M9;2);IF(A1="LCB";VLOOK UP(B1;D1:M9;3);...)

The problem is that I have more than 7 "IF" and I cannot do this in
Excel 2K3.

Can someone help me? I would like to be able to grow the table as
needed.

Thanks in advance.


xlmate

Lookup value based on 2 cell values
 
Hi

Would you post your sample and your expected result
as not sure why you need to IF statements.

HTH
--
Pls provide your feedback by clicking the Yes button below if this post have
help you. This will help others to search the archives for result better.


Thank You

cheers, francis









"BorderMaster" wrote:

Hello all,

I am trying to find a way to search through a table the value based on
2 other cells. The 2 base cells have 9 and 10 different possibilities
respectively so this gives me a table with 90 options. How can I do
this? My first thought was something like this:

=IF(A1="LCT";VLOOKUP(B1;D1:M9;2);IF(A1="LCB";VLOOK UP(B1;D1:M9;3);...)

The problem is that I have more than 7 "IF" and I cannot do this in
Excel 2K3.

Can someone help me? I would like to be able to grow the table as
needed.

Thanks in advance.


BorderMaster

Lookup value based on 2 cell values
 
On Feb 7, 8:44*am, Teethless mama
wrote:
Try this:

=VLOOKUP(B1,D1:M9,MATCH(A1,{"LCT","LCB"},)+1,)

"BorderMaster" wrote:
Hello all,


I am trying to find a way to search through a table the value based on
2 other cells. The 2 base cells have 9 and 10 different possibilities
respectively so this gives me a table with 90 options. How can I do
this? My first thought was something like this:


=IF(A1="LCT";VLOOKUP(B1;D1:M9;2);IF(A1="LCB";VLOOK UP(B1;D1:M9;3);....)


The problem is that I have more than 7 "IF" and I cannot do this in
Excel 2K3.


Can someone help me? I would like to be able to grow the table as
needed.


Thanks in advance.


It is working. Thank you so much! What does the "+1" stand for in the
formula?

Teethless mama

Lookup value based on 2 cell values
 
You're Welcome!


"BorderMaster" wrote:

On Feb 7, 8:44 am, Teethless mama
wrote:
Try this:

=VLOOKUP(B1,D1:M9,MATCH(A1,{"LCT","LCB"},)+1,)

"BorderMaster" wrote:
Hello all,


I am trying to find a way to search through a table the value based on
2 other cells. The 2 base cells have 9 and 10 different possibilities
respectively so this gives me a table with 90 options. How can I do
this? My first thought was something like this:


=IF(A1="LCT";VLOOKUP(B1;D1:M9;2);IF(A1="LCB";VLOOK UP(B1;D1:M9;3);....)


The problem is that I have more than 7 "IF" and I cannot do this in
Excel 2K3.


Can someone help me? I would like to be able to grow the table as
needed.


Thanks in advance.


It is working. Thank you so much! What does the "+1" stand for in the
formula?


Shane Devenshire[_2_]

Lookup value based on 2 cell values
 
Hi,

The +1 is added because the MATCH returns 1 or 2 depending on which one you
were looking for, but in the VLOOKUP range the column from which you want to
return the result is either 2 or 3 because the first column is the lookup
column so +1.

You can also use
=SUMPRODUCT((E1:M1=A1)*(D2:D11=B1)*E2:M11)

where the data range looks something like:
E F G ....
1 LCT LCB
2 B 77 19
3 A 35 6
4 C 29 23
5 D 61 5
6 E 10 56
7 F 68 89
8 G 28 70
9 Z 62 35
10 N 45 44

And you enter the items you want to search for in A1 and B1.

By using range references you make the formula a lot more flexible.

Where the

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"BorderMaster" wrote:

On Feb 7, 8:44 am, Teethless mama
wrote:
Try this:

=VLOOKUP(B1,D1:M9,MATCH(A1,{"LCT","LCB"},)+1,)

"BorderMaster" wrote:
Hello all,


I am trying to find a way to search through a table the value based on
2 other cells. The 2 base cells have 9 and 10 different possibilities
respectively so this gives me a table with 90 options. How can I do
this? My first thought was something like this:


=IF(A1="LCT";VLOOKUP(B1;D1:M9;2);IF(A1="LCB";VLOOK UP(B1;D1:M9;3);....)


The problem is that I have more than 7 "IF" and I cannot do this in
Excel 2K3.


Can someone help me? I would like to be able to grow the table as
needed.


Thanks in advance.


It is working. Thank you so much! What does the "+1" stand for in the
formula?


T. Valko

Lookup value based on 2 cell values
 
Do you have column headers in your table that are LCT, LCB ?

Like this:

...........D..........E...........F
1..................LCT......LCB
2.......0..........10..........12
3.......5..........14..........17
4.......7..........11..........20

If so:

=VLOOKUP(B1;D1:F4;MATCH(A1;D1:F1;0))


--
Biff
Microsoft Excel MVP


"BorderMaster" wrote in message
...
Hello all,

I am trying to find a way to search through a table the value based on
2 other cells. The 2 base cells have 9 and 10 different possibilities
respectively so this gives me a table with 90 options. How can I do
this? My first thought was something like this:

=IF(A1="LCT";VLOOKUP(B1;D1:M9;2);IF(A1="LCB";VLOOK UP(B1;D1:M9;3);...)

The problem is that I have more than 7 "IF" and I cannot do this in
Excel 2K3.

Can someone help me? I would like to be able to grow the table as
needed.

Thanks in advance.




Shane Devenshire[_2_]

Lookup value based on 2 cell values
 
Hi BorderMaster,

As you can see by the last two responses, the earlier responses are
guesswork because you didn't show us what your data area looks like.

Good points T.V and HTH!
--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"T. Valko" wrote:

Do you have column headers in your table that are LCT, LCB ?

Like this:

...........D..........E...........F
1..................LCT......LCB
2.......0..........10..........12
3.......5..........14..........17
4.......7..........11..........20

If so:

=VLOOKUP(B1;D1:F4;MATCH(A1;D1:F1;0))


--
Biff
Microsoft Excel MVP


"BorderMaster" wrote in message
...
Hello all,

I am trying to find a way to search through a table the value based on
2 other cells. The 2 base cells have 9 and 10 different possibilities
respectively so this gives me a table with 90 options. How can I do
this? My first thought was something like this:

=IF(A1="LCT";VLOOKUP(B1;D1:M9;2);IF(A1="LCB";VLOOK UP(B1;D1:M9;3);...)

The problem is that I have more than 7 "IF" and I cannot do this in
Excel 2K3.

Can someone help me? I would like to be able to grow the table as
needed.

Thanks in advance.





BorderMaster

Lookup value based on 2 cell values
 
On Feb 7, 3:58*pm, Shane Devenshire
wrote:
Hi BorderMaster,

As you can see by the last two responses, the earlier responses are
guesswork because you didn't show us what your data area looks like.

Good points T.V and HTH!
--
If this helps, please click the Yes button

Cheers,
Shane Devenshire

"T. Valko" wrote:
Do you have column headers in your table that are LCT, LCB ?


Like this:


...........D..........E...........F
1..................LCT......LCB
2.......0..........10..........12
3.......5..........14..........17
4.......7..........11..........20


If so:


=VLOOKUP(B1;D1:F4;MATCH(A1;D1:F1;0))


--
Biff
Microsoft Excel MVP


"BorderMaster" wrote in message
....
Hello all,


I am trying to find a way to search through a table the value based on
2 other cells. The 2 base cells have 9 and 10 different possibilities
respectively so this gives me a table with 90 options. How can I do
this? My first thought was something like this:


=IF(A1="LCT";VLOOKUP(B1;D1:M9;2);IF(A1="LCB";VLOOK UP(B1;D1:M9;3);...)


The problem is that I have more than 7 "IF" and I cannot do this in
Excel 2K3.


Can someone help me? I would like to be able to grow the table as
needed.


Thanks in advance.


Thanks everyone,

Sorry for the late response, I was away for a while.

I used something like T.V. wrote where the LCT, LCB... are headers. It
works perfectly.

GM

T. Valko

Lookup value based on 2 cell values
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"BorderMaster" wrote in message
...
On Feb 7, 3:58 pm, Shane Devenshire
wrote:
Hi BorderMaster,

As you can see by the last two responses, the earlier responses are
guesswork because you didn't show us what your data area looks like.

Good points T.V and HTH!
--
If this helps, please click the Yes button

Cheers,
Shane Devenshire

"T. Valko" wrote:
Do you have column headers in your table that are LCT, LCB ?


Like this:


...........D..........E...........F
1..................LCT......LCB
2.......0..........10..........12
3.......5..........14..........17
4.......7..........11..........20


If so:


=VLOOKUP(B1;D1:F4;MATCH(A1;D1:F1;0))


--
Biff
Microsoft Excel MVP


"BorderMaster" wrote in message
...
Hello all,


I am trying to find a way to search through a table the value based on
2 other cells. The 2 base cells have 9 and 10 different possibilities
respectively so this gives me a table with 90 options. How can I do
this? My first thought was something like this:


=IF(A1="LCT";VLOOKUP(B1;D1:M9;2);IF(A1="LCB";VLOOK UP(B1;D1:M9;3);...)


The problem is that I have more than 7 "IF" and I cannot do this in
Excel 2K3.


Can someone help me? I would like to be able to grow the table as
needed.


Thanks in advance.


Thanks everyone,

Sorry for the late response, I was away for a while.

I used something like T.V. wrote where the LCT, LCB... are headers. It
works perfectly.

GM




All times are GMT +1. The time now is 05:29 PM.

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