Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup

I am trying to look up a value in one list to provide me with a value I will
then use to lookup data in a second list. Essentially, I want to join 2
lists/tables in Excel.

Here's the example:

DISPLAY DETAILS LIST
Selected?.....HoldingKey.....AcctSecRefKey.....Pos itionKey
Y..........HK1..........ASR1..........PK1
N..........HK2..........ASR2..........PK2
N..........HK3..........ASR3..........PK3


ASR TABLE
AcctSecRefKey.....AcctKey..........SecIDKey.....Re g.....Loc.....SecID.....SecIDType
ASR1..........AK1..........SID2..........REG1..... BBH.....ID2.....ISIN
ASR2..........AK2..........SID2..........REG1..... SSB.....ID2.....ISIN
ASR3..........AK3..........SID2..........REG1..... DB.....ID2.....ISIN

1. For those rows in DISPLAY DETAILS LIST where Selected = Y, return the
AcctSecRefKey value from DISPLAY DETAILS LIST. (Example results: ASR1)

2. For that AcctSecRefKey value, return the SecID value from ASR TABLE.
(Example results: ID2)

I want to use this formula so that I can lookup the apprporiate SecID and
SecIDType values from the ASR TABLE for those rows where the user selected
the row.

I can easily create a formula to accomplish step #1:
IF(ISERROR(VLOOKUP("Y",DisplayDetails,3,FALSE)),"S elect a
row",(VLOOKUP("Y",DisplayDetails,3,FALSE))).

I can easily create a formula to accomplish step #2 WHERE the Lookup_value
(i.e., AcctSecRefKey) is "hard-coded":
IF(ISERROR(VLOOKUP("ASR1",ASR,6,FALSE)),"Data Not
Found",(VLOOKUP("ASR1",ASR,6,FALSE)))

What I am struggling with is how to combine these 2 steps into a single
formula.

Please advise of any ideas or assistance on how to accomplish this.

Thanks in advance!
--
Thanks,
Jen
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup

It sounds like your problem is solvable by nesting the lookups, e.g.:

VLOOKUP( VLOOKUP("Y",DisplayDetails,3,FALSE) ,ASR,6,FALSE)

"JBush" wrote:

I am trying to look up a value in one list to provide me with a value I will
then use to lookup data in a second list. Essentially, I want to join 2
lists/tables in Excel.

Here's the example:

DISPLAY DETAILS LIST
Selected?.....HoldingKey.....AcctSecRefKey.....Pos itionKey
Y..........HK1..........ASR1..........PK1
N..........HK2..........ASR2..........PK2
N..........HK3..........ASR3..........PK3


ASR TABLE
AcctSecRefKey.....AcctKey..........SecIDKey.....Re g.....Loc.....SecID.....SecIDType
ASR1..........AK1..........SID2..........REG1..... BBH.....ID2.....ISIN
ASR2..........AK2..........SID2..........REG1..... SSB.....ID2.....ISIN
ASR3..........AK3..........SID2..........REG1..... DB.....ID2.....ISIN

1. For those rows in DISPLAY DETAILS LIST where Selected = Y, return the
AcctSecRefKey value from DISPLAY DETAILS LIST. (Example results: ASR1)

2. For that AcctSecRefKey value, return the SecID value from ASR TABLE.
(Example results: ID2)

I want to use this formula so that I can lookup the apprporiate SecID and
SecIDType values from the ASR TABLE for those rows where the user selected
the row.

I can easily create a formula to accomplish step #1:
IF(ISERROR(VLOOKUP("Y",DisplayDetails,3,FALSE)),"S elect a
row",(VLOOKUP("Y",DisplayDetails,3,FALSE))).

I can easily create a formula to accomplish step #2 WHERE the Lookup_value
(i.e., AcctSecRefKey) is "hard-coded":
IF(ISERROR(VLOOKUP("ASR1",ASR,6,FALSE)),"Data Not
Found",(VLOOKUP("ASR1",ASR,6,FALSE)))

What I am struggling with is how to combine these 2 steps into a single
formula.

Please advise of any ideas or assistance on how to accomplish this.

Thanks in advance!
--
Thanks,
Jen

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Join 2 Lists - Lookup value in 1 list & use result in 2nd look

Thanks, Eddie!! That is exactly what I needed (so simple and obvious, that I
just overlooked it previously).

--
Thanks,
Jen


"Eddie O" wrote:

It sounds like your problem is solvable by nesting the lookups, e.g.:

VLOOKUP( VLOOKUP("Y",DisplayDetails,3,FALSE) ,ASR,6,FALSE)

"JBush" wrote:

I am trying to look up a value in one list to provide me with a value I will
then use to lookup data in a second list. Essentially, I want to join 2
lists/tables in Excel.

Here's the example:

DISPLAY DETAILS LIST
Selected?.....HoldingKey.....AcctSecRefKey.....Pos itionKey
Y..........HK1..........ASR1..........PK1
N..........HK2..........ASR2..........PK2
N..........HK3..........ASR3..........PK3


ASR TABLE
AcctSecRefKey.....AcctKey..........SecIDKey.....Re g.....Loc.....SecID.....SecIDType
ASR1..........AK1..........SID2..........REG1..... BBH.....ID2.....ISIN
ASR2..........AK2..........SID2..........REG1..... SSB.....ID2.....ISIN
ASR3..........AK3..........SID2..........REG1..... DB.....ID2.....ISIN

1. For those rows in DISPLAY DETAILS LIST where Selected = Y, return the
AcctSecRefKey value from DISPLAY DETAILS LIST. (Example results: ASR1)

2. For that AcctSecRefKey value, return the SecID value from ASR TABLE.
(Example results: ID2)

I want to use this formula so that I can lookup the apprporiate SecID and
SecIDType values from the ASR TABLE for those rows where the user selected
the row.

I can easily create a formula to accomplish step #1:
IF(ISERROR(VLOOKUP("Y",DisplayDetails,3,FALSE)),"S elect a
row",(VLOOKUP("Y",DisplayDetails,3,FALSE))).

I can easily create a formula to accomplish step #2 WHERE the Lookup_value
(i.e., AcctSecRefKey) is "hard-coded":
IF(ISERROR(VLOOKUP("ASR1",ASR,6,FALSE)),"Data Not
Found",(VLOOKUP("ASR1",ASR,6,FALSE)))

What I am struggling with is how to combine these 2 steps into a single
formula.

Please advise of any ideas or assistance on how to accomplish this.

Thanks in advance!
--
Thanks,
Jen

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Join 2 Lists - Lookup value in 1 list & use result in 2nd look

I have a follow-up question using my same sample data:

ASR TABLE
AcctSecRefKey.....AcctKey..........SecIDKey.....Re g.....Loc.....SecID.....SecIDType
ASR1..........AK1..........SID2..........REG1..... BBH.....ID2.....ISIN
ASR2..........AK2..........SID2..........REG1..... SSB.....ID2.....ISIN
ASR3..........AK3..........SID2..........REG1..... DB.....ID2.....ISIN

I want to create a list of AcctSecRefKeys WHERE the SecIDKey = SID2.

Basically, the user will enter a SecIDKey value in a cell (A1), and then I
want the formula to create a row listing of the corresponding AcctSecRefKeys
(i.e., ASR1, ASR2, ASR3 in cells A2:A4).

I've seen several posts that hint at how to do this, but haven't found one
yet that explicitly defines how to accomplish this.

Thanks in advance for assistance.


--
Thanks,
Jen


"JBush" wrote:

Thanks, Eddie!! That is exactly what I needed (so simple and obvious, that I
just overlooked it previously).

--
Thanks,
Jen


"Eddie O" wrote:

It sounds like your problem is solvable by nesting the lookups, e.g.:

VLOOKUP( VLOOKUP("Y",DisplayDetails,3,FALSE) ,ASR,6,FALSE)

"JBush" wrote:

I am trying to look up a value in one list to provide me with a value I will
then use to lookup data in a second list. Essentially, I want to join 2
lists/tables in Excel.

Here's the example:

DISPLAY DETAILS LIST
Selected?.....HoldingKey.....AcctSecRefKey.....Pos itionKey
Y..........HK1..........ASR1..........PK1
N..........HK2..........ASR2..........PK2
N..........HK3..........ASR3..........PK3


ASR TABLE
AcctSecRefKey.....AcctKey..........SecIDKey.....Re g.....Loc.....SecID.....SecIDType
ASR1..........AK1..........SID2..........REG1..... BBH.....ID2.....ISIN
ASR2..........AK2..........SID2..........REG1..... SSB.....ID2.....ISIN
ASR3..........AK3..........SID2..........REG1..... DB.....ID2.....ISIN

1. For those rows in DISPLAY DETAILS LIST where Selected = Y, return the
AcctSecRefKey value from DISPLAY DETAILS LIST. (Example results: ASR1)

2. For that AcctSecRefKey value, return the SecID value from ASR TABLE.
(Example results: ID2)

I want to use this formula so that I can lookup the apprporiate SecID and
SecIDType values from the ASR TABLE for those rows where the user selected
the row.

I can easily create a formula to accomplish step #1:
IF(ISERROR(VLOOKUP("Y",DisplayDetails,3,FALSE)),"S elect a
row",(VLOOKUP("Y",DisplayDetails,3,FALSE))).

I can easily create a formula to accomplish step #2 WHERE the Lookup_value
(i.e., AcctSecRefKey) is "hard-coded":
IF(ISERROR(VLOOKUP("ASR1",ASR,6,FALSE)),"Data Not
Found",(VLOOKUP("ASR1",ASR,6,FALSE)))

What I am struggling with is how to combine these 2 steps into a single
formula.

Please advise of any ideas or assistance on how to accomplish this.

Thanks in advance!
--
Thanks,
Jen

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
Table_array lookup through a define list Salman Excel Worksheet Functions 10 November 22nd 06 09:41 AM
auto updating list Larry Excel Worksheet Functions 8 July 27th 06 01:59 PM
Currency to Text mytipi Excel Worksheet Functions 1 February 21st 06 11:43 PM
VBA Monty Excel Worksheet Functions 2 January 30th 06 01:37 PM
I NEED HELP with the SPELLNUMBER Function vag Excel Worksheet Functions 0 June 21st 05 08:17 AM


All times are GMT +1. The time now is 09:20 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"