+ Reply to Thread
Results 1 to 5 of 5

How to Index and match to return the last value from variable column

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    12

    How to Index and match to return the last value from variable column

    Hi again every one,

    Im here again for some strange problem about my worksheet.

    I have a set of table that contains data which some (column cell) are blank.
    First Column was populated by date.
    2nd Column was populated by shift.
    the remaining column was populated by datas that are not consistent each column, some are blanks.

    I want to Index and match to return the data of the last cell before the blank cell matching the 2 criteria (Date and Shift).

    Please see attached file. ----> Index and match formula.xls

    Thanks

    Aie

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: How to Index and match to return the last value from variable column

    In Q9 use this array formula

    =LOOKUP(2,1/(INDEX($C$2:$L$31,MATCH(O9&P9,$A$2:$A$31&$B$2:$B$31,0),)<>""),INDEX($C$2:$L$31,MATCH(O9&P9,$A$2:$A$31&$B$2:$B$31,0),))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    07-10-2013
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: How to Index and match to return the last value from variable column

    Quote Originally Posted by Ace_XL View Post
    In Q9 use this array formula

    =LOOKUP(2,1/(INDEX($C$2:$L$31,MATCH(O9&P9,$A$2:$A$31&$B$2:$B$31,0),)<>""),INDEX($C$2:$L$31,MATCH(O9&P9,$A$2:$A$31&$B$2:$B$31,0),))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Copy down
    Very nice Ace_XL, i almost lost my mind thinking how and what formula to use.

    Thanks

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: How to Index and match to return the last value from variable column

    Or

    Non Array

    =LOOKUP(99^99,OFFSET($C$1,LOOKUP(2,1/($A$2:$A$31&$B$2:$B$31=($O9&$P9)),ROW($B$2:$B$31))-ROW($B$2)+1,,,10))


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: How to Index and match to return the last value from variable column

    IN Q9, and drag down.

    Please Login or Register  to view this content.

+ 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: 3
    Last Post: 06-15-2012, 04:19 PM
  2. Return Column Header from Index/Match function
    By del24ie in forum Excel General
    Replies: 2
    Last Post: 01-12-2012, 11:57 AM
  3. Replies: 2
    Last Post: 01-12-2012, 07:02 AM
  4. Index/Match Function to Return column header
    By djmarsh51 in forum Excel General
    Replies: 2
    Last Post: 05-07-2010, 02:10 PM
  5. Replies: 2
    Last Post: 02-27-2010, 11:17 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