+ Reply to Thread
Results 1 to 6 of 6

attempting to dynamically define table with index

  1. #1
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    attempting to dynamically define table with index

    ....i'm almost there...think i'm missing something simple here but been at this for awhile now and would like some help.

    Basically, I would like to replace the 4:8 in this statement with a dynamic range....users will be adding rows above and growing the curent table and I want the calculations on row 17 (attached document) to adjust for a moving/growing table.


    =INDEX(4:8,MATCH(B17,INDEX(4:8,,12),1),10)+(B17-INDEX(4:8,MATCH(B17,INDEX(4:8,,12),1),12))*G11

    I've tried the following:
    INDEX((MATCH(">>begin<<",B:B,0)+2) : (MATCH(">>end<<",B:B,0)-1),MATCH(B17,INDEX(4:8,,12),1),10)+(B17-INDEX(4:8,MATCH(B17,INDEX(4:8,,12),1),12))*G11

    Basically i've sanwiched the table between two markers (>>begin<< and >>end<<) and i'm trying to use match to find the markers to dynamically define the tables rows...

    any help out there?
    Attached Files Attached Files
    Last edited by GeneralDisarray; 10-21-2011 at 04:34 PM.
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  2. #2
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    345

    Re: attempting to dynamically define table with index

    This will expand from B4 to last row with number.Then match what you want. HTH

    index(B4:INDEX(B:B,MATCH(1E+30,B:B))
    Please acknowledge the response you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  3. #3
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: attempting to dynamically define table with index

    Are you saying you cannot organize the data on the sheet to take advantage of Dynamic Named Ranges and augment the formulas?
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  4. #4
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: attempting to dynamically define table with index

    @ connection lost...the problem is ...this is a template for one part of a report in which there will be many tables like this...and a template of this report will be used to create daily reports.

    So, I didn't want to used named ranges because i plan to copy/paste from the template to start the daily reports....and i've never played with copy/paste creating new named ranges...

    i may try that if i can't get this to work at all. but i was hoping there was a way to just Match some key word to indicate the start row.


    -----

    seems like placing match on either side of the colon, Match() : Match() would work (as match is returning a row number and something like 4:8 works well enough)
    Last edited by GeneralDisarray; 10-21-2011 at 03:25 PM.

  5. #5
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: attempting to dynamically define table with index

    Ok, got it figured out...never done this before so i'm not sure what this technique is called if anything

    Had to replace the STATIC call to 4:8 with -
    INDIRECT("$" & INDEX(1:1048576,MATCH(">>begin<<",A:A,0)+2,1) &":$"& INDEX(1:1048576,MATCH(">>end<<",A:A,0)-1,1) )


    ____

    oh, and to do that i had to move the Begin / End tags to the A column and put the row number in column A (next to the table).///

  6. #6
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: attempting to dynamically define table with index

    Ok...Solution book attached....had to futz with it a little more....damn typos when i inserted that gigantic formula to replace 4:8

    gonna paste this as it's probably the longest formula i've ever written Adding rows...no problem ... paste to new sheet, no problem

    =INDEX(INDIRECT("$" & INDEX(1:1048576,MATCH(">>begin<<",A:A,0)+2,1) &":$"& INDEX(1:1048576,MATCH(">>end<<",A:A,0)-1,1)),MATCH(B18,INDEX(INDIRECT("$" & INDEX(1:1048576,MATCH(">>begin<<",A:A,0)+2,1) &":$"& INDEX(1:1048576,MATCH(">>end<<",A:A,0)-1,1)),,12),1),11)+(B18-INDEX(INDIRECT("$" & INDEX(1:1048576,MATCH(">>begin<<",A:A,0)+2,1) &":$"& INDEX(1:1048576,MATCH(">>end<<",A:A,0)-1,1)),MATCH(B18,INDEX(INDIRECT("$" & INDEX(1:1048576,MATCH(">>begin<<",A:A,0)+2,1) &":$"& INDEX(1:1048576,MATCH(">>end<<",A:A,0)-1,1)),,12),1),12))*G13

    LOL! it's miller time....
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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