+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : Referencing a row of a named range.

  1. #1
    Registered User
    Join Date
    06-14-2012
    Location
    Tyler, Texas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Referencing a row of a named range.

    Hey guys,


    I have a function that has a range (a single row) as an input. I can determine the index of the row that I need, and can manually select it from the named range, but I need to be able to reference it via some other method.

    To help visualize what I am trying to do, here is the format of the named range that I wish to reference:

    Please Login or Register  to view this content.
    For the sake of this question, let "A1" = 1, "A2" = 2, and so on, with "B1" = A, "C1" = B, etc.

    I need to be able to input to my function something other than
    Please Login or Register  to view this content.
    to reference the first row, or
    Please Login or Register  to view this content.
    to reference the third row.

    It would be nice if I could use
    Please Login or Register  to view this content.
    or something like that.

    The reason behind this is that this table is a lookup table and the formula is being used on a different sheet where the locations of the function calls do not necessarily correspond to the positions needed from the lookup table,
    e.g.
    Please Login or Register  to view this content.
    and the cells containing the function calls are occasionally sorted. (The order of the rows in the lookup table never changes.)

    I will need to use my function for several thousand lookups but the lookup table might only have 50 rows. Also, if it helps, the lookup table is of known width.


    Thanks in advance for any help on this!
    Last edited by Dr3vvn45ty; 06-14-2012 at 07:52 PM. Reason: syntax

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Referencing a row of a named range.

    I believe you want the INDEX() function.

    Basically the INDEX() function gives a range (or grid) and then you specify which row and column number you want within that range.

    For example: INDEX(A1:E5,3,0) would reference A3:E3 while INDEX(A1:E5,3,3) would reference C3
    Last edited by Cutter; 06-14-2012 at 08:16 PM.

  3. #3
    Registered User
    Join Date
    06-14-2012
    Location
    Tyler, Texas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Referencing a row of a named range.

    Thanks for the response.

    So how can I use the INDEX() function to reference the entire row?

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Referencing a row of a named range.

    See the examples in my edit above. Using 0 for the column argument references all columns.

    Here's a link: http://www.excelfunctions.net/Excel-Index-Function.html

  5. #5
    Registered User
    Join Date
    06-14-2012
    Location
    Tyler, Texas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Referencing a row of a named range.

    You, sir, are a life saver. It does exactly what I need it to do.

    Thanks so much. Case Solved

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Referencing a row of a named range.

    You're very welcome. Have a great day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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