Join 2 Lists - Lookup value in 1 list & use result in 2nd lookup

J

JBush

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.....PositionKey
Y..........HK1..........ASR1..........PK1
N..........HK2..........ASR2..........PK2
N..........HK3..........ASR3..........PK3


ASR TABLE
AcctSecRefKey.....AcctKey..........SecIDKey.....Reg.....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)),"Select 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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top