+ Reply to Thread
Results 1 to 5 of 5

Dynamic Index/Match function when column location is unknown?

  1. #1
    Registered User
    Join Date
    03-10-2014
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    3

    Dynamic Index/Match function when column location is unknown?

    I am trying to collect data from multiple worksheets into one worksheet, generally I can accomplish this using INDEX/MATCH/INDIRECT to create one dynamic formula that can accomplish it. The problem I have now is that on each worksheet all the columns are in a different order. The main problem is that my unique identifier is for each row is in a different position on each sheet. I know a basic solution would be to copy the unique identifier and place it in the first column for each sheet but I need to create a dynamic formula that makes this possible without moving any columns around.


    If I need to expand on what I am trying to do let me know and I can.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Dynamic Index/Match function when column location is unknown?

    Hi ac,

    The Index Match solution might work for you, depending on how your data is laid out.

    Look at the "Distance Between Cities" example on this site:
    http://www.contextures.com/xlFunctions03.html

    That would be my best guess without seeing your data and its structure.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    03-10-2014
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Dynamic Index/Match function when column location is unknown?

    I will take a look at that video but let me try to expound:

    I have 5 bond portfolios, each bond is being identified by its unique CUSIP, each portfolio is on its own tab and each tab has all the same column headers but in a different order. I need to create an aggregate "Master Portfolio" tab where I can see all the data laid out uniformly. If the CUSIP was in Column A I would be able to create a single dynamic formula using INDEX (for lookup), MATCH (find column headers) and INDIRECT(to get to the proper tab).

    However, CUSIP is in a different column each time so I cant define a static column to find the CUSIP in my match formula. I need a way to somehow tell it to match to my column "CUSIP" regardless of what column it is.

    Make more sense?

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Dynamic Index/Match function when column location is unknown?

    Yep.

    That is what I'm imagining. The "Distance between cities" example will do a match down the column looking for the cusip and return its row. You can then use the match across a single row to determine the column (if needed). Then the Index function will work as you will have a row and column number to poke into the array. Watch the video I recommended above.

    It all depends on what your data looks like.

  5. #5
    Registered User
    Join Date
    03-10-2014
    Location
    New York
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Dynamic Index/Match function when column location is unknown?

    Thanks for the video but that is no applicable. I generally use the standard index match function as described in the video but it wont work in my example. I am going to try again to explain...

    I have five tabs and i need to pull the data into one aggregate tab. Each tab has all the same columns, but in random order. When I use the index/match I need to tell it lookup and match "value x" in this specific column and then lookup and match it against these column headers. In my example I cannot state which column "value x" is in and I need a formula that will figure it out on its own.

    Does that make more sense? If not, I will dumb down the workbook and post it.

+ 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: 6
    Last Post: 11-08-2013, 10:29 PM
  2. INDEX/MATCH function eventually changed the location of the source file
    By seimeion1208 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-30-2013, 07:07 AM
  3. Column comparison using match and index function
    By shraddha5 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-17-2013, 01:11 AM
  4. Replies: 2
    Last Post: 11-05-2011, 03:26 PM
  5. Index/Match Function to Return column header
    By djmarsh51 in forum Excel General
    Replies: 2
    Last Post: 05-07-2010, 02:10 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