A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Lookup value based on 2 cell values



 
 
Thread Tools Display Modes
  #1  
Old February 7th, 2009, 02:19 PM posted to microsoft.public.excel.worksheet.functions
BorderMaster[_2_]
external usenet poster
 
Posts: 3
Default 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.
  #2  
Old February 7th, 2009, 02:44 PM posted to microsoft.public.excel.worksheet.functions
Teethless mama
external usenet poster
 
Posts: 3,722
Default 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.

  #3  
Old February 7th, 2009, 02:48 PM posted to microsoft.public.excel.worksheet.functions
xlmate
external usenet poster
 
Posts: 143
Default 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.

  #4  
Old February 7th, 2009, 03:01 PM posted to microsoft.public.excel.worksheet.functions
BorderMaster[_2_]
external usenet poster
 
Posts: 3
Default 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?
  #5  
Old February 7th, 2009, 05:34 PM posted to microsoft.public.excel.worksheet.functions
Teethless mama
external usenet poster
 
Posts: 3,722
Default 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?

  #6  
Old February 7th, 2009, 06:23 PM posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_3_]
external usenet poster
 
Posts: 3,333
Default 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)*(D211=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?

  #7  
Old February 7th, 2009, 07:29 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default 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.



  #8  
Old February 7th, 2009, 09:58 PM posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_3_]
external usenet poster
 
Posts: 3,333
Default 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.




  #9  
Old February 10th, 2009, 04:25 PM posted to microsoft.public.excel.worksheet.functions
BorderMaster[_2_]
external usenet poster
 
Posts: 3
Default 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
  #10  
Old February 10th, 2009, 05:35 PM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default 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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.