+ Reply to Thread
Results 1 to 12 of 12

Index a Named Range

Hybrid View

her.rockstar Index a Named Range 07-05-2018, 09:43 AM
PFDave Re: Index a Named Range 07-05-2018, 10:18 AM
her.rockstar Re: Index a Named Range 07-05-2018, 10:22 AM
PFDave Re: Index a Named Range 07-05-2018, 10:23 AM
her.rockstar Re: Index a Named Range 07-05-2018, 10:25 AM
PFDave Re: Index a Named Range 07-05-2018, 10:33 AM
her.rockstar Re: Index a Named Range 07-05-2018, 10:39 AM
PFDave Re: Index a Named Range 07-05-2018, 10:41 AM
her.rockstar Re: Index a Named Range 07-05-2018, 12:30 PM
romperstomper Re: Index a Named Range 07-05-2018, 01:06 PM
her.rockstar Re: Index a Named Range 07-05-2018, 01:10 PM
PFDave Re: Index a Named Range 07-06-2018, 03:24 AM
  1. #1
    Forum Contributor her.rockstar's Avatar
    Join Date
    01-11-2013
    Location
    Saint John, NB
    MS-Off Ver
    Office 365
    Posts
    194

    Index a Named Range

    Hello, I have a worksheet (Variables) in my workbook with 73 dynamic named ranges.
    On my Entry sheet, I need to find a way to index a named range of my choosing.

    For example,
    I will choose a named range from a drop-down

    VARarea

    Then below, I need to list the 10 (or however many) items resulting from that named range

    I understand I can go
    =index(VARarea,1)
    which will bring me the first result, and then I could use 2 the line below, etc., but I need to be able to dynamically change the VARarea to something else. Using a cell reference doesn't work though. Seems like I need INDIRECT?
    Last edited by her.rockstar; 07-05-2018 at 09:52 AM.

  2. #2
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Index a Named Range

    If they are all named ranges and your first dropdown has them listed as they are named then you just use =INDIRECT("A1") inside the list source or whatever the location of the first dropdown box is in
    Please do add reputation where you see fit, it's nice to be nice and we all enjoy a pat on the back

    Please also mark your thread as solved once it has been.

  3. #3
    Forum Contributor her.rockstar's Avatar
    Join Date
    01-11-2013
    Location
    Saint John, NB
    MS-Off Ver
    Office 365
    Posts
    194

    Re: Index a Named Range

    Hey PFDave, thanks for the response.

    Say I've chosen VARarea in A1, if in A2 I use =INDIRECT("A1"), the result is VARarea.

    I need it to bring me the first item in the VARarea list

  4. #4
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Index a Named Range

    Ah so as opposed to wanting it to just define the next drop down box you want to know what options could be available and have those listed ?

  5. #5
    Forum Contributor her.rockstar's Avatar
    Join Date
    01-11-2013
    Location
    Saint John, NB
    MS-Off Ver
    Office 365
    Posts
    194

    Re: Index a Named Range

    Yes exactly. Another example is the dynamic range VARtime.

    If I select VARtime from my dropdown list in A1, I want A2:A50 to show this:

    12:00 AM
    12:30 AM
    1:00 AM
    1:30 AM
    2:00 AM
    2:30 AM
    3:00 AM
    3:30 AM
    4:00 AM
    4:30 AM
    5:00 AM
    5:30 AM
    6:00 AM
    6:30 AM
    7:00 AM
    7:30 AM
    8:00 AM
    8:30 AM
    9:00 AM
    9:30 AM
    10:00 AM
    10:30 AM
    11:00 AM
    11:30 AM
    12:00 PM
    12:30 PM
    1:00 PM
    1:30 PM
    2:00 PM
    2:30 PM
    3:00 PM
    3:30 PM
    4:00 PM
    4:30 PM
    5:00 PM
    5:30 PM
    6:00 PM
    6:30 PM
    7:00 PM
    7:30 PM
    8:00 PM
    8:30 PM
    9:00 PM
    9:30 PM
    10:00 PM
    10:30 PM
    11:00 PM
    11:30 PM
    Not Listed

  6. #6
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Index a Named Range

    ok so you could use =INDEX(INDIRECT($A$1),ROW()-1) and drag down, but as you have varying depths of range I'm not sure formula is the best method, I would be going for a vba solution

  7. #7
    Forum Contributor her.rockstar's Avatar
    Join Date
    01-11-2013
    Location
    Saint John, NB
    MS-Off Ver
    Office 365
    Posts
    194

    Re: Index a Named Range

    I'm afraid it's coming back #REF!

  8. #8
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Index a Named Range

    Quote Originally Posted by her.rockstar View Post
    I'm afraid it's coming back #REF!
    Fine in attached file,

    Please can you upload a sample of your workbook so I can check the names match?
    Attached Files Attached Files

  9. #9
    Forum Contributor her.rockstar's Avatar
    Join Date
    01-11-2013
    Location
    Saint John, NB
    MS-Off Ver
    Office 365
    Posts
    194

    Re: Index a Named Range

    Thank you for sending your sample file. I have a feeling the problem is coming from my Dynamic Named Range

    VARtime
    =OFFSET(Variables!$B$2,0,0,COUNTA(Variables!$B:$B)-1,1)

    Suppose this could be the problem?

  10. #10
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,978

    Re: Index a Named Range

    INDIRECT doesn't work with dynamic ranges. You could use a table though.

  11. #11
    Forum Contributor her.rockstar's Avatar
    Join Date
    01-11-2013
    Location
    Saint John, NB
    MS-Off Ver
    Office 365
    Posts
    194

    Re: Index a Named Range

    Ah, that doesn't sound like a bad idea. Would that mean I won't need any named ranges?

  12. #12
    Valued Forum Contributor PFDave's Avatar
    Join Date
    05-17-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    Excel 2013
    Posts
    1,067

    Re: Index a Named Range

    Quote Originally Posted by her.rockstar View Post
    Ah, that doesn't sound like a bad idea. Would that mean I won't need any named ranges?
    When you format as a data range they are essentially already named ranges for each column

+ 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. [SOLVED] SUM part of named range with INDEX
    By esbencito in forum Excel General
    Replies: 4
    Last Post: 04-19-2018, 07:12 AM
  2. Named range in Index & Match
    By edward_glyver in forum Excel General
    Replies: 10
    Last Post: 04-29-2016, 08:11 AM
  3. [SOLVED] =AVERAGEIF with named range index
    By Nate Westcott in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-03-2015, 12:42 PM
  4. Help using named range with index function
    By mpjennings25 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-08-2013, 04:09 PM
  5. Help using named range with index function
    By mpjennings25 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-08-2013, 03:48 PM
  6. Using INDEX with named range reference
    By engmeee in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 11-19-2008, 06:21 PM
  7. Named range lookup using Index and match
    By Sirrob01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-01-2007, 11:15 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