Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 144
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
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)*(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?

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
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


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
Lookup Price based on two values tomhelle Excel Discussion (Misc queries) 3 November 16th 08 04:38 AM
How to assign values to a cell based on values in another cell? Joao Lopes Excel Worksheet Functions 1 December 5th 07 09:02 PM
Lookup Based on 4 values [email protected] Excel Discussion (Misc queries) 3 December 22nd 06 07:57 PM
Populating a field based on lookup values Sav_C Excel Worksheet Functions 5 August 6th 06 02:49 AM
Vlookup based on two lookup values Trip Excel Worksheet Functions 2 April 8th 05 06:25 PM


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

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"