+ Reply to Thread
Results 1 to 8 of 8

Dynamic INDEX/MATCH

  1. #1
    Forum Contributor
    Join Date
    06-30-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2013
    Posts
    251

    Dynamic INDEX/MATCH

    The attached document has a column (here column R) that can change. At the bottom of the sheet (rows 1761-1766), in that column, there are some labels I'm hoping to use for an INDEX/MATCH, vLOOKUP type formula. The formula itself will be on another sheet (on the attached, Sheet2!B8 for example. What I'm wondering is how to basically use INDEX/MATCH or VLOOKUP, with the array beginning in the column where i find "Current Portfolio" (in this case, again, column R). I can't seem to wrap my head around how this should be done. Thanks!
    Attached Files Attached Files

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

    Re: Dynamic INDEX/MATCH

    You left out two important bits of information (or your wording wasn't sufficiently clear). In both cases, i made a guess....

    1. Is Stock Turnover ALWAYS in column R. I have assumed that the answer is "No".

    2. What values do you want to have returned? I have assumed that is is the numbers, starting two columns to the right of Stock Turnover.

    If I'm wrong on either count (or both counts!!) please explain clearly!!

    In sheet2, B8, copied across:
    =INDEX(Test!$A$1:$AJ$3000,SUMPRODUCT((Test!$A$1:$AJ$3000="Stock Turnover")*(ROW(Test!$A$1:$AJ$3000))),SUMPRODUCT((Test!$A$1:$AJ$3000="Stock Turnover")*(COLUMN(Test!$A$1:$AJ$3000)))+COLUMNS($A:B))
    Attached Files Attached Files
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    06-30-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2013
    Posts
    251

    Re: Dynamic INDEX/MATCH

    Sorry about that. Yes, you are correct for #1. The "Current Portfolio" column is dynamic and has the ability to change.

    As far as #2 is concerned, apologies for leaving that part out. Your assumption was essentially correct. Except that this feeds to a different sheet where the user (me) will put in the reference (Min, 30%, Target%, etc...) so I'd need to lookup based on that one reference. And yes, you're also correct in that the Min column (which is essentially the beginning of the array in which I'd like to search) will always be two columns to the right of "Current Portfolio" tab.

    I'm hoping that's more clear but if it's not please let me know. And thanks for the help, much appreciated!

  4. #4
    Forum Contributor
    Join Date
    06-30-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2013
    Posts
    251

    Re: Dynamic INDEX/MATCH

    Any ideas?

  5. #5
    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,780

    Re: Dynamic INDEX/MATCH

    Please update the workbook with the data requested.
    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.

  6. #6
    Forum Contributor
    Join Date
    06-30-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2013
    Posts
    251

    Re: Dynamic INDEX/MATCH

    I've attached another copy of the test workbook that includes another metric I need to find along with three example references where I'm trying to show that I would need metrics for certain portfolios at certain times, with the flexibility to change those references. That's why initially, i was thinking some form of INDEX/MATCH or VLOOKUP. Effectively, I need a way to find the "Current Portfolio" tab and then use that as the first column of a new array in which I will look to find the appropriate values on the attached sheet.
    Attached Files Attached Files

  7. #7
    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,193

    Re: Dynamic INDEX/MATCH

    Based on Glenn's formula ..

    in B8

    =INDEX(Test!$A$1:$AJ$3000,SUMPRODUCT((Test!$A$1:$AJ$3000=$A8)*(ROW(Test!$A$1:$AJ$3000))),SUMPRODUCT((Test!$A$1:$AJ$3000=$A8)*(COLUMN(Test!$A$1:$AJ$3000)))+$B$7*10+2)

    in C8

    =INDEX(Test!$A$1:$AJ$3000,SUMPRODUCT((Test!$A$1:$AJ$3000=$A8)*(ROW(Test!$A$1:$AJ$3000))),SUMPRODUCT((Test!$A$1:$AJ$3000=$A8)*(COLUMN(Test!$A$1:$AJ$3000)))+$B$7*10+3)

    in D8

    =INDEX(Test!$A$1:$AJ$3000,SUMPRODUCT((Test!$A$1:$AJ$3000=$A8)*(ROW(Test!$A$1:$AJ$3000))),SUMPRODUCT((Test!$A$1:$AJ$3000=$A8)*(COLUMN(Test!$A$1:$AJ$3000)))+$D$7*10+2)

    Copy all down
    Attached Files Attached Files
    Last edited by JohnTopley; 02-25-2018 at 07:36 AM.

  8. #8
    Forum Contributor
    Join Date
    06-30-2017
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2013
    Posts
    251

    Re: Dynamic INDEX/MATCH

    This is great, and almost exactly what I'm looking for. To be honest, I'm not fully understanding what the formula is actually doing (I'm not sure about the role of the sumbroducts and multiplication by 10), but it does seem to be working. There seems to be only one issue that I'm having which is the portfolios that are described by text (Min, Target, and Max). Target populates on the sheet as it is in the version you attached, but if I change that reference cell to something else, and then back to Target, I get an error. Same thing with when "Min" and "Max" are entered.

    Thank you so much for the help!

+ 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. Index/Match - Dynamic Index Range with Hlookup
    By WassimJMP in forum Excel General
    Replies: 3
    Last Post: 02-16-2016, 12:24 PM
  2. Use Dynamic Range for index match?
    By bvokey in forum Excel General
    Replies: 3
    Last Post: 02-14-2016, 09:04 PM
  3. [SOLVED] INDEX MATCH, MATCH and ADD for a dynamic scatter gram chart
    By julesmctavish in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-12-2016, 10:40 AM
  4. [SOLVED] Dynamic Sheet-Index-Match-
    By FinanceGQ in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-08-2015, 03:03 AM
  5. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  6. [SOLVED] Dynamic Lookup / Index Match
    By mrgreek in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-03-2013, 05:44 PM
  7. Vba index and match for dynamic range
    By _google in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-20-2013, 10:25 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