+ Reply to Thread
Results 1 to 8 of 8

Index/match dynamic result column

  1. #1
    Registered User
    Join Date
    02-08-2016
    Location
    Holland
    MS-Off Ver
    2010
    Posts
    22

    Question Index/match dynamic result column

    Hi all,

    Is it possible to make the column from which index/match gives a return value dynamic, based on a value in a different cell?

    In Vlookup I could use a formula like "=VlookupA3;data!A3:E3;formula!B1+1)" to make the result colum dynamic. If the value in b1 would be 3, vlookup would use the fourth column to give a return value.

    In index/match the lookup is based an a column header, so I can't use a +1 to make the return value column dynamic. Instead I will manually have to change the column header each month.

    For example: I use cell B1 to input the number of the month, for March I enter "3". Based on the "3" I would like to get a return result from column "G". In April however I would change cell B1 to "4", than I would like to get a return result from column "H"

    Hope you understand my question and can help me out (also see attachment)
    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,206

    Re: Index/match dynamic result column

    Try

    =INDEX(data!b:e,MATCH(formula!A3,data!A:A),MATCH($B$1,data!$B$2:$E$2,0))
    Last edited by JohnTopley; 03-18-2016 at 03:35 PM.

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Index/match dynamic result column

    Try it like this...

    =INDEX(data!B3:E10,MATCH(A3,data!A3:A10,0),B1)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    02-08-2016
    Location
    Holland
    MS-Off Ver
    2010
    Posts
    22

    Re: Index/match dynamic result column

    Thanks both

    @Tony Valko: Your method works like a charm. Can you explain how the addition of B1 in the end of the formula make it work? That's the only addition you made to the formula it seems?

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Index/match dynamic result column

    =INDEX(data!B3:E10,MATCH(A3,data!A3:A10,0),B1)

    MATCH tells INDEX which row to look in and B1 (3) tells it which column to look in.

    It appears that B1 will be a number from 1 to 12 for the months?

  6. #6
    Registered User
    Join Date
    02-08-2016
    Location
    Holland
    MS-Off Ver
    2010
    Posts
    22

    Re: Index/match dynamic result column

    Great Tony. I tried it onto my actual spreadsheet and it works. I also understand how it works now, so can use it for feature spreadsheets. My question is solved.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Index/match dynamic result column

    Good deal. Thanks for the feedback!

  8. #8
    Registered User
    Join Date
    01-15-2020
    Location
    Nottingham, England
    MS-Off Ver
    2016
    Posts
    1

    Re: Index/match dynamic result column

    Hi Tony,

    Can you do the same but with two way index match? What I mean is can you do two way index match and then designate a column like 4?

    Thanks

+ 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 returning 2nd/3rd/nth result in each proceeding column
    By tbar05 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-22-2015, 01:00 AM
  2. [SOLVED] how to ignore column (without result) in INDEX MATCH multi column
    By irruzzz in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-09-2014, 07:05 AM
  3. [SOLVED] Index/Match result should again search for zero result
    By ursanil in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-07-2014, 04:45 AM
  4. [SOLVED] Dynamic search; using column # result to determine column used for column/row match.
    By David Brunk in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-18-2014, 09:57 PM
  5. Replies: 6
    Last Post: 09-09-2014, 02:25 PM
  6. Dynamic Index/Match function when column location is unknown?
    By ac1987 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-10-2014, 09:47 PM
  7. Replies: 6
    Last Post: 11-08-2013, 10:29 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