+ Reply to Thread
Results 1 to 8 of 8

Index Match formula using range name

  1. #1
    Registered User
    Join Date
    12-07-2007
    MS-Off Ver
    Office Pro 2000 & 2007
    Posts
    26

    Index Match formula using range name

    Hi All

    I am trying to tidy up a large workbook, and need some help with use of range names in the Match function.

    I have the formula working on the attached sample, but wonder whether it's possible to get the Match function Lookup Array to pick itself from the range name.

    Thanks in advance

    Jon
    Attached Files Attached Files
    Last edited by BBS; 05-20-2009 at 10:14 AM.

  2. #2
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Index Match formula using range name

    You have your formula the wrong way round

    =INDEX(Test_1,MATCH($B6,Sheet2!$C$7:$H$7,0),MATCH($C6,Sheet2!$C$7:$C$12,0))

    should be

    =INDEX(Test_1,MATCH($C6,Sheet2!$C$7:$C$12,0),MATCH($B6,Sheet2!$C$7:$H$7,0))
    Regards
    Darren

    Update 12-Nov-2010 Still job hunting!

    If you are happy with the results, please add to our reputation by clicking the blue scales icon in the blue bar of the post.

    Learn something new each day, Embrace change do not fear it, evolve and do not become extinct!


  3. #3
    Registered User
    Join Date
    12-07-2007
    MS-Off Ver
    Office Pro 2000 & 2007
    Posts
    26

    Re: Index Match formula using range name

    Thanks Squiggler, I rushed the sample sheet a bit.

    What do they say about checking things....

    I've attached the corrected sheet, still hoping that there's a way of using the range name to give the match lookup array

    Thanks

    Jon
    Attached Files Attached Files
    Last edited by BBS; 05-20-2009 at 05:57 AM.

  4. #4
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Index Match formula using range name

    You can do this which is what i do for tables

    if you need multiple tables you can code

    =INDEX(indirect("TableName" & "_Body"),match(ValueB,indirect("TableName" & "_ValueB"),0),match(ValueA,indirect("TableName" & "_ValueA"),0))

    (see sample sheet as to how I named It) using names like this gives it more clarity to find your errors as well!)

    (note I only used ValueB as a sample rather than $c$1 in the match statement)

  5. #5
    Registered User
    Join Date
    12-07-2007
    MS-Off Ver
    Office Pro 2000 & 2007
    Posts
    26

    Re: Index Match formula using range name

    Thanks again Squiggler, this option certainly makes the formula easier to understand.

    Sorry for not being clear enough with my initial question, but what I'm trying to get to, is to automatically change the match lookup array if the table array changes.

    A bit more info...

    I have a master workbook that currently contains 32 worksheets. This is made up of a number of fixed information sheets, and a number of calculation sheets that cross reference them.

    I'm trying to lump relevant information together into tables on the fixed information sheets, which means that these are constantly changing.

    The information is potentially used in a large number of calculations throughout the workbook, I'm trying to pull the info in from one source [ie. the range name] to automatically update all calculations.
    Because of the sheer number of defined tables already in use [100+], I am concerned that array values may get missed if they need to be manually updated.

  6. #6
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Index Match formula using range name

    I guess what you want to do is make 3 names for each table

    MyTable
    table

    TableValueA
    =offset(mytable,0,0,1,columns(Mytable))

    TableValueB
    =offset(MyTable,0,0,rows(Mytable),1)

    then you can do

    Index(Mytable,match(ValueB,TablevalueB,0),match(valueA,tablevalueA,0))

    If your table changes just change MyTable to reference the new table limits!
    Last edited by squiggler47; 05-20-2009 at 07:38 AM. Reason: Added Atachment

  7. #7
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: Index Match formula using range name

    If you Want to see the Names

    Type MyTableA in the name box and press enter

  8. #8
    Registered User
    Join Date
    12-07-2007
    MS-Off Ver
    Office Pro 2000 & 2007
    Posts
    26

    Re: Index Match formula using range name

    Thanks again Squiggler, this works a treat.

    Either I'm going mad [probable], or I think you may have attached the original spreadsheet.
    I have re-attached the file, with the ranges updated as shown in your post, and additions to the original table in case anyone else finds it useful.

    Do you know if there is a limit to the number of ranges that can be defined?

    Edit - I've also just seen this link on another thread, which could be combined with the solutions here to provide a more automated approach to the whole issue. http://www.cpearson.com/excel/named.htm
    Last edited by BBS; 05-20-2009 at 09:30 AM. Reason: addition

+ 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