+ Reply to Thread
Results 1 to 5 of 5

Help with attempt at array formula

  1. #1
    Forum Contributor
    Join Date
    11-04-2015
    Location
    Copenhagen, Denmark
    MS-Off Ver
    2010
    Posts
    114

    Help with attempt at array formula

    I am trying to do an index-match with multiple matches. So, an array formula as I understand. It's my first attempt at it alone...didn't work.

    I am trying to return a time stamp based on 2 matches: date and flight number.

    I have attached a sample workbook with 2 sheets.
    I have highlighted what I am trying to return in the cell with color highlighting.

    I am curious, one of the extracted data sets appears to have several possible matches (i.e. MVTs cells G6:G9; ideally there would only be one match in the data set). Could this result in the #N/A? How does the array handle it when there are multiple possible matches, the first one or an #N/A?
    Attached Files Attached Files

  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,152

    Re: Help with attempt at array formula

    Try

    in Z2

    =INDEX(MVTs!$G$2:$G$17,MATCH($Y2&$AB2,MVTs!$H$2:$H$17&MVTs!$F$2:$F$17,0))

    Enter with Ctrl+Shift+Enter

    NOTE: Column F had blank in front of "AD" and "AA": removed in attachment.
    Attached Files Attached Files
    Last edited by JohnTopley; 04-17-2017 at 09:18 AM.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Help with attempt at array formula

    Snap, John - you just beat me to it!
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Help with attempt at array formula

    Hi

    Base on John Formula? You can use without array formula?

    Z2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    enter, then copy down

    Regard
    To help you by my post? it would be nice to click on to say "Thank you".
    If you are happy with a solution to your problem?
    Click Thread Tools above your first post,
    select "Mark your thread as Solved".

  5. #5
    Forum Contributor
    Join Date
    11-04-2015
    Location
    Copenhagen, Denmark
    MS-Off Ver
    2010
    Posts
    114

    Re: Help with attempt at array formula

    Thanks for the speedy responses.

    Both methods worked; although the non-array formula in some instances failed to return a value.

    As mentioned, the data is not so clean as there should only be 2 time stamps per flight number and date (a departure and arrival). There are sometimes several different time stamps on the same date and flight number, which results in differing results in the array outcome depending on how the data is sorted.

    You learn something new every day.

+ 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. Formula issue in spreadsheet every attempt causes wrong value
    By danelliott in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-12-2016, 02:35 PM
  2. [SOLVED] Attempt to add array list to macro not working
    By capson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-02-2014, 02:27 PM
  3. [SOLVED] My Attempt in using an Array but getting an error (3265)
    By efisher in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-13-2014, 03:31 PM
  4. Apply formula to a certain column ( attempt made )
    By Tmc2159 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-17-2013, 05:08 PM
  5. Replies: 4
    Last Post: 03-17-2011, 09:24 AM
  6. 2nd attempt ~ Faster/Shorter formula
    By Luke in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-15-2005, 12:35 PM
  7. 2nd attempt ~ complicated formula
    By Luke in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-08-2005, 11:40 PM

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