+ Reply to Thread
Results 1 to 8 of 8

Lookup and output multiple values from table

  1. #1
    Registered User
    Join Date
    03-14-2016
    Location
    Germany
    MS-Off Ver
    Office 2013
    Posts
    15

    Question Lookup and output multiple values from table

    Hi guys,
    I've shopped a couple of forums for a solution and even consulted the dark web (Google page 2 and 3 ) but wasn't able to find what I am looking for. Here's a quick description of my problem:

    Column A = Equity, Bonds, Credit, Collateral, FX Hedge, ... [Asset class in general]
    Column B = Future, Option, Bondoption, Cash... [Type of instrument]
    Column C = Combination of A&B (e.g. EquityFuture, BondsBondoption, BondsFuture, ...) [functions as a identifier to get what I want as easy as possible]
    Column D = Bloomberg ticker (e.g. VGM6 Index, ESM6 Index, RXM6 Comdty)
    Column E = Quantity

    What do I want: If column C = EquityFuture, return every value from column D and E for which this is true.

    I know it has to do with INDEX, MATCH and OFFSET but I don't seem to get to a solution that works.

    Would be grateful if someone could look into this and help me.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Lookup and output multiple values from table

    Try

    For Column D entries

    =IFERROR(INDEX($D$2:$D$1000,SMALL(IF($C$2:$C$1000="EquityFuture",ROW($D$2:$D$1000)-ROW($D$2)+1,""),ROWS($D$2:D2))),"")

    For Column E entries

    =IFERROR(INDEX($E$2:$E$1000,SMALL(IF($C$2:$C$1000="EquityFuture",ROW($E$2:$E$1000)-ROW($E$2)+1,""),ROWS($E$2:E2))),"")


    Enter both with Ctrl+Shift+Enter

    Copy down until you get blank cells

  3. #3
    Registered User
    Join Date
    03-14-2016
    Location
    Germany
    MS-Off Ver
    Office 2013
    Posts
    15

    Re: Lookup and output multiple values from table

    Thanks John. Worked flawlessly.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Lookup and output multiple values from table

    Thank you for the feedback.

    Could you please mark thread as solved ("Thread Tools" at top of first post)

  5. #5
    Registered User
    Join Date
    03-14-2016
    Location
    Germany
    MS-Off Ver
    Office 2013
    Posts
    15

    Re: Lookup and output multiple values from table

    Hi another question that is probably related but I can't get the condition / equation right:
    Column F = expiry date / maturity date

    IF column A = Equity, return Bloomberg Ticker for every position that has an expiry date 21 days from today

    Any ideas?

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Lookup and output multiple values from table

    Can you please post a sample file (not image). how does "Equity" in A relate (if at all) to "EquityFuture" in C?

  7. #7
    Registered User
    Join Date
    03-14-2016
    Location
    Germany
    MS-Off Ver
    Office 2013
    Posts
    15

    Re: Lookup and output multiple values from table

    Example1.xlsx

    Here you go John.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Lookup and output multiple values from table

    In I8

    =IFERROR(INDEX($D$2:$D$4,SMALL(IF(($A$2:$A$4=I$7)*($F$2:$F$4=TODAY()+21),ROW($A$2:$A$4)-ROW($A$2)+1,""),ROWS($A$2:A2))),"")

    Enter with Ctrl+Shift+Enter
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 10
    Last Post: 09-16-2015, 11:25 PM
  2. VBA to output a value based on value from a Lookup table
    By Cailin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-05-2013, 06:43 AM
  3. Replies: 2
    Last Post: 04-01-2011, 08:43 AM
  4. Replies: 16
    Last Post: 03-08-2010, 09:25 PM
  5. lookup values from multiple formula table
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-04-2009, 11:15 AM
  6. Match or Lookup multiple approximate values from a table
    By fasih in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-20-2009, 11:01 AM
  7. Lookup & output of multiple values related to ID in column
    By VanF00 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-24-2008, 04:55 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1