+ Reply to Thread
Results 1 to 21 of 21

Getting last row value with INDEX MATCH MATCH

  1. #1
    Registered User
    Join Date
    09-16-2020
    Location
    Finland
    MS-Off Ver
    Office 365
    Posts
    13

    Question Getting last row value with INDEX MATCH MATCH

    Hello everyone, nice to meet you

    I have a problem with a function. Let's say I have a table which has been formatted as shown in picture below. I cannot change the formatting of the table, as it is pre-generated. The only exception is, the real table is a lot bigger, and sometimes the identifiers are in different columns. I am looking for a function or set of functions which..

    1. Scan row 1 horizontally unless it matches Identifier3
    2. Because the attribute is in the next column, it must go the column with Identifier3 +1 col
    3. Finally, I would like to get the numerical value on the lowest filled cell. It is not necessarily the lowest or highest value in the column, thereby =MIN/MAX are not applicable.

    pic1.png

    Any help would be highly appreciated!
    Attached Images Attached Images

  2. #2
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,382

    Re: Getting last row value with INDEX MATCH MATCH

    Welcome to the forum, it is best to upload an attachment and add examples in the attachment

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Getting last row value with INDEX MATCH MATCH

    User-defined function...
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    09-16-2020
    Location
    Finland
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Getting last row value with INDEX MATCH MATCH

    Quote Originally Posted by dangelor View Post
    User-defined function...
    Please Login or Register  to view this content.
    Oh wow, thank you for replying so fast, and this does exactly what I wanted! I should really get into VBA as well, seems to open a whole new world of possibilities.

    Edit: Ah, there is one more problem. If the range where I want to search is on a different worksheet, how does the function change? Let's say I have a named range which goes to exportedvalues1.xlsx, 'Data'-tab and range would be for example A5:K20? Workbook name is a variable but tab name and the range is generally static.

    Also, the row where to search is not always row nr. 1.
    Last edited by Toalle; 09-17-2020 at 06:06 AM. Reason: One more slight problem

  5. #5
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Getting last row value with INDEX MATCH MATCH

    Try this..
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    09-16-2020
    Location
    Finland
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Getting last row value with INDEX MATCH MATCH

    Quote Originally Posted by dangelor View Post
    Try this..
    Please Login or Register  to view this content.
    I'm afraid I don't know how this works. Is it possible to create a function which first asks the search value, followed by the range where to search? And then performs the task as described earlier. Thank you again for your help so far!

  7. #7
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Getting last row value with INDEX MATCH MATCH

    What you ask is possible, but not as a user-defined function. I'll work something up later today.

  8. #8
    Registered User
    Join Date
    09-16-2020
    Location
    Finland
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Getting last row value with INDEX MATCH MATCH

    Quote Originally Posted by dangelor View Post
    What you ask is possible, but not as a user-defined function. I'll work something up later today.
    Ahh, I see. Thank you, I'm waiting eagerly..

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,461

    Re: Getting last row value with INDEX MATCH MATCH

    Formula solution:

    Assum Indentifier condition in H8

    H9:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Quang PT

  10. #10
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,382

    Re: Getting last row value with INDEX MATCH MATCH

    I've been waiting for you to upload and still haven't waited until now
    Because I want to confirm the actual location of your attachment cell area

    Try this formula (Array formula)
    HTML Code: 
    Last edited by wk9128; 09-18-2020 at 09:07 AM.

  11. #11
    Registered User
    Join Date
    09-16-2020
    Location
    Finland
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Getting last row value with INDEX MATCH MATCH

    Quote Originally Posted by wk9128 View Post
    I've been waiting for you to upload and still haven't waited until now
    Because I want to confirm the actual location of your attachment cell area

    Try this formula (Array formula)
    HTML Code: 
    Sorry for not posting the worksheet earlier, however, here it is. I was unable to make your formula work.
    Attached Files Attached Files

  12. #12
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Getting last row value with INDEX MATCH MATCH

    See if this is what you need...
    Please Login or Register  to view this content.

  13. #13
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,382

    Re: Getting last row value with INDEX MATCH MATCH

    Quote Originally Posted by Toalle View Post
    Sorry for not posting the worksheet earlier, however, here it is. I was unable to make your formula work.
    Yes, please see this attachment
    Attached Files Attached Files

  14. #14
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Getting last row value with INDEX MATCH MATCH

    Please try

    =LOOKUP(9^9,INDEX(C:K,,MATCH(N13,B1:J1,)))
    Attached Files Attached Files

  15. #15
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,382

    Re: Getting last row value with INDEX MATCH MATCH

    Hi Bo_Ry . After reading your answer, I thought of this trick. My thinking is too complicated.

    HTML Code: 

  16. #16
    Registered User
    Join Date
    09-16-2020
    Location
    Finland
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Getting last row value with INDEX MATCH MATCH

    Thank you everyone for your answers

    Quote Originally Posted by dangelor View Post
    See if this is what you need...
    Please Login or Register  to view this content.
    Getting very close here, does exactly what is needed, but is it really not possible to create a function which does exactly the same thing? This macro of yours allows me to do searches one at a time, but I would need this data to update automatically, and so that I can drag'n'fill formula in a table, which contains file name variable in another cell telling the macro in which workbook to search in (as mentioned before, tab name is always same, content order is generally the same but may vary occasionally, only workbook name and path is a variable)..

    But hey, superb work here, thank you! If you have any more ideas towards making something like I described, I would appreciate that a lot.

    E: Here is an attachment showing how I would need it to be
    Attached Files Attached Files
    Last edited by Toalle; 09-21-2020 at 02:18 AM.

  17. #17
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Getting last row value with INDEX MATCH MATCH

    Change column C to hold just the paths and filenames...
    Please Login or Register  to view this content.

  18. #18
    Registered User
    Join Date
    09-16-2020
    Location
    Finland
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Getting last row value with INDEX MATCH MATCH

    Quote Originally Posted by dangelor View Post
    Change column C to hold just the paths and filenames...
    Please Login or Register  to view this content.
    I wish I was as skilled as you some day. Thank you for your help, I got what I needed

  19. #19
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Getting last row value with INDEX MATCH MATCH

    I wish I was as skilled as you some day
    Like you, I started asking for help... Good luck!

  20. #20
    Registered User
    Join Date
    09-16-2020
    Location
    Finland
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Getting last row value with INDEX MATCH MATCH

    Quote Originally Posted by dangelor View Post
    Like you, I started asking for help... Good luck!
    Hey, one more slight issue. Things changed a bit and I have to search values from 2 different tabs, everything is exactly the same but tab name is different (however the same workbook), and the function to execute is exactly the same. I can obviously copy-paste this as another VBA-script and call it after the first one has completed, but in that case it takes 5 minutes for this script to complete.

    I'm guessing that could be halved by opening the workbooks only once and getting values from 2 different tabs, but I can't write that kind of code. Does that sound like something you could maybe do? So, exactly the same code as you posted earlier but somehow look from 2 different tabs with same search terms..

    Thanks a bunch!

    Edit: I managed to achieve this but I'm not sure if this is a efficient way to run this script. Takes at the moment 4 min 30 sec to open 27 workbooks and get values. Could this be shortened somehow? Dangelor..?

    Code:
    Please Login or Register  to view this content.
    Last edited by Toalle; 09-23-2020 at 04:38 AM.

  21. #21
    Registered User
    Join Date
    09-16-2020
    Location
    Finland
    MS-Off Ver
    Office 365
    Posts
    13

    Re: Getting last row value with INDEX MATCH MATCH

    Bump

+ 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: 5
    Last Post: 02-18-2017, 11:21 AM
  2. [SOLVED] Match-Index in stead of Index-Match lookup Array among Arrays
    By Numnum in forum Excel General
    Replies: 2
    Last Post: 10-15-2015, 02:08 PM
  3. INDEX MATCH MATCH/OFFSET MATCH MATCH with named ranges
    By Andrew-Mark in forum Excel General
    Replies: 3
    Last Post: 02-27-2015, 10:56 PM
  4. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  5. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  6. Replies: 3
    Last Post: 05-02-2013, 01:31 AM
  7. Replies: 5
    Last Post: 02-29-2012, 08:51 PM

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