+ Reply to Thread
Results 1 to 6 of 6

INDEX(MATCH) dynamic column range?

  1. #1
    Forum Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    INDEX(MATCH) dynamic column range?

    I will use a brief scenario to try to explain the formula I am looking for:

    The formula will always start in cell AR4. What I want the formula to do is search all of row 2 for the word "Composite". When it finds the first instance of "Composite", I would like the formula to return the value in that column that corresponds with the row the formula is placed in.

    For example, say the word "Composite" is in Column C. Then AR4 should equal the value in C4. AR5 should equal the value in C5, etc...

    Is this possible with a formula? If not, VBA is fine as well.

    Thank you for the help!

  2. #2
    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 column range?

    Maybe something like this...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    2
    Doobie
    Scooby
    Composite
    Cramps
    ------
    Composite
    3
    4
    Doobie1
    Scooby1
    Composite1
    Cramps1
    Composite1
    5
    Doobie2
    Scooby2
    Composite2
    Cramps2
    Composite2
    6
    Doobie3
    Scooby3
    Composite3
    Cramps3
    Composite3
    7
    Doobie4
    Scooby4
    Composite4
    Cramps4
    Composite4
    8
    Doobie5
    Scooby5
    Composite5
    Cramps5
    Composite5
    9


    This formula entered in F4:

    =INDEX(A$4:D$8,ROWS(F$4:F4),MATCH(F$2,A$2:D$2,0))

    Copy down as needed.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    Re: INDEX(MATCH) dynamic column range?

    Quote Originally Posted by Tony Valko View Post
    Maybe something like this...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    2
    Doobie
    Scooby
    Composite
    Cramps
    ------
    Composite
    3
    4
    Doobie1
    Scooby1
    Composite1
    Cramps1
    Composite1
    5
    Doobie2
    Scooby2
    Composite2
    Cramps2
    Composite2
    6
    Doobie3
    Scooby3
    Composite3
    Cramps3
    Composite3
    7
    Doobie4
    Scooby4
    Composite4
    Cramps4
    Composite4
    8
    Doobie5
    Scooby5
    Composite5
    Cramps5
    Composite5
    9


    This formula entered in F4:

    =INDEX(A$4:D$8,ROWS(F$4:F4),MATCH(F$2,A$2:D$2,0))

    Copy down as needed.
    Works perfectly! Thank you so much!

  4. #4
    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 column range?

    You're welcome. Thanks for the feedback!

  5. #5
    Forum Contributor
    Join Date
    12-29-2012
    Location
    usa
    MS-Off Ver
    Excel 2016
    Posts
    325

    Re: INDEX(MATCH) dynamic column range?

    Quote Originally Posted by Tony Valko View Post
    You're welcome. Thanks for the feedback!
    EDIT: Nevermind figured out my issue.
    Last edited by nobodyukno; 07-19-2016 at 03:44 PM.

  6. #6
    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 column range?

    Maybe this...

    =INDEX(D$4:AV$4000,ROWS(AR$4:AR4),MATCH(IF(COUNTIF(D$2:AU$2,"Composite Fund"),"Composite Fund","Composite"),D$2:AU$2,0))

+ 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. Replies: 6
    Last Post: 09-09-2014, 02:25 PM
  4. Replies: 6
    Last Post: 11-08-2013, 10:29 PM
  5. 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
  6. Dynamic Range issues with index/match(i think)
    By Furby in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-11-2013, 08:18 AM
  7. dynamic range for index/match formula
    By excellicious in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-29-2008, 07:41 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