+ Reply to Thread
Results 1 to 9 of 9

Lookup functions based on array position

Hybrid View

  1. #1
    Registered User
    Join Date
    05-24-2015
    Location
    Melbourne, VIC
    MS-Off Ver
    2010
    Posts
    20

    Lookup functions based on array position

    Hi,

    My problem relates to looking up a value based on the position of the column (one column in a table of multiple columns) that I'm restricting my lookup to.

    The broader data I'm using is as follows: I am building a table of different financial securities that are divided by domicile (states in Australia). I need to adjust the cash flow days for public holidays which I have separated based on state and national public holidays.
    Next to the name of each security I have inserted a drop down list from which the state domicile of each security can be selected. After this I have inserted a function that calculates the next cash flow day for each security. Based on the domicile selection of each security I want to be able to look up the calculated cash flow day in the table of sorted public holidays by first narrowing down my matching to the specific column of public holidays based on domicile so that I only get a match if the cash flow day of a security falls on a date that is a public holiday for the same domicile in which that security is issued.

    I'm open to any alternative ways of doing this given that public holidays are always sorted by domicile and not collated into the one column without domicile based sorting.

    Thanks.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Lookup functions based on array position

    For future reference, its always better if you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

    Having said that though, see if this will help you....
    A
    B
    C
    D
    E
    1
    ww xx yy zz
    2
    aa
    1
    10
    100
    1000
    3
    bb
    2
    20
    200
    2000
    4
    cc
    3
    30
    300
    3000
    5
    dd
    4
    40
    400
    4000
    6
    ee
    5
    50
    500
    5000
    7
    8
    bb
    9
    xx
    10
    20

    A10=INDEX($B$2:$E$6,MATCH(A8,$A$2:$A$6,0),MATCH(A9,$B$1:$E$1,0))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-24-2015
    Location
    Melbourne, VIC
    MS-Off Ver
    2010
    Posts
    20

    Re: Lookup functions based on array position

    In my data set I don't have the equivalent of column A in your table. My data is only sorted into different columns by state and not by rows

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lookup functions based on array position

    As suggested - can you post a small sample workbook, showing your data layout AND your expected result (manually calculated).

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    The paperclip icon
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Registered User
    Join Date
    05-24-2015
    Location
    Melbourne, VIC
    MS-Off Ver
    2010
    Posts
    20

    Re: Lookup functions based on array position

    Worksheet 1: Security database

    Security Cash flow date W/end test Pass/Fail Weekend adjustment Security Domicile Public Holiday Test Pass/Fail Public Holiday Adjustment Public Holiday Test Pass/Fail Final Date
    Security 1 Date 1 Test 1 Fail Second calculation State 1 Test 1a Fail Third calculation Test 1b Pass Date 1 adjusted for tests 1 & 1a
    Security 2 Date 2 Test 2 Pass State 2 Test 2a Pass Date 2
    Security 3 Date 3 Test 3 Fail Second calculation State 3 Test 3a Fail Third calculation Test 3b Pass Date 3 adjusted for tests 3 & 3a
    Security 4 Date 4 Test 4 Pass State 4 Test 4a Pass Date 4


    Worksheet 2: Public Holidays List

    State 1 State 2 State 3 State 4
    Date 1 Date 1 Date 1 Date 1
    Date 2 Date 2 Date 2 Date 2
    Date 3 Date 3 Date 3 Date 3
    Date 4 Date 4 Date 4 Date 4
    Date 5 Date 5 Date 5 Date 5

  6. #6
    Registered User
    Join Date
    05-24-2015
    Location
    Melbourne, VIC
    MS-Off Ver
    2010
    Posts
    20

    Re: Lookup functions based on array position

    Sample.docx

    Please find sample attached

  7. #7
    Registered User
    Join Date
    05-24-2015
    Location
    Melbourne, VIC
    MS-Off Ver
    2010
    Posts
    20

    Re: Lookup functions based on array position

    Sorry everyone I'll try uploading something now

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Lookup functions based on array position

    These are not spreadsheets!! Please upload a sample EXcel sheet and indicate your expected results.

  9. #9
    Registered User
    Join Date
    05-24-2015
    Location
    Melbourne, VIC
    MS-Off Ver
    2010
    Posts
    20

    Re: Lookup functions based on array position

    Apologies for the inconvenience in not putting up spreadsheets last night. Also apologies for the late reply but I managed to get it to work with a few nested if/index/match functions (I'm happy to share for anyone that's interested - it may even give someone the opportunity to refine it and make it more function efficient- just let me know )

    Thanks to everyone that tried to help (given I didn't articulate my problem that clearly) it is greatly appreciated.

    FJMoussally signing off

+ 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. Dynamic userform position based on widow position
    By Manish84 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-16-2015, 07:47 AM
  2. [SOLVED] Find Data in one array and match the position in another array
    By zeeman2 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-27-2013, 07:55 PM
  3. UDF Lookup function as an alternative to array functions & match/index
    By Andrew_Harris in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-15-2012, 09:34 PM
  4. Replies: 1
    Last Post: 02-10-2012, 05:27 PM
  5. Replies: 0
    Last Post: 01-11-2012, 09:55 AM
  6. Help with table lookup using array functions
    By DaveF in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-04-2008, 03:08 PM
  7. [SOLVED] Allow refence in the "table_array" position of Lookup functions
    By fcjssc in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-03-2005, 10:06 AM

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