+ Reply to Thread
Results 1 to 10 of 10

How do I know if Dynamic Range is working?

  1. #1
    Registered User
    Join Date
    12-14-2008
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    73

    How do I know if Dynamic Range is working?

    I have columns A, B, C. Header row is 1, data begins in row 2. I created a dynamic range (Formulas/Define Name/Define Name) by giving it a name and put this in the Refers To...

    =OFFSET(Sheet1!$B$2,0,0,COUNTA(Sheet1!$B:$B),1)

    It seemed to 'take' but I can't tell. I though it should show if I highlighted one of the cells in the range, or if I highlighted all cells in the range. I see nothing. How do I know if it worked?

    I know enough to be dangerous. I am trying to create this Dynamic Range so I can refer to it in another workbook for data entry validation in a certain column in that other workbook. I assume that what I did above is the first step... I have to create the Dynamic Range.

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How do I know if Dynamic Range is working?

    I believe you should be using something like this to define your Dynamic Named Range
    =OFFSET(Sheet1!$B$1,1,0,COUNTA(Sheet1!$B:$B)-1,1)

    You can test by
    • Press F5
    • Type the name of your Dynamic Named Range
    • Press OK

    Your DNR will be selected.

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: How do I know if Dynamic Range is working?

    You can open up the name manager box by selecting ctrl + F3

    Once in there you name the dynamic name range and in the refer to you enter the formula.

    =OFFSET(Sheet1!$B$2,0,0,COUNTA(Sheet1!$B:$B),1)

    Save it by pressing the check box and then if you place your cursor in the box with the formula it should hightlight the range with the marching ants
    HTH
    Regards, Jeff

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How do I know if Dynamic Range is working?

    test with
    =sum(OFFSET(Sheet1!$B$2,0,0,COUNTA(Sheet1!$B:$B),1))
    now put some numbers in b2 down
    mind you i'd use

    =Sheet1!$B$2:INDEX(Sheet1!$B:$B,COUNTA(Sheet1!$B:$B))
    instead
    Last edited by martindwilson; 07-02-2011 at 09:41 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    12-14-2008
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: How do I know if Dynamic Range is working?

    Quote Originally Posted by Ron Coderre View Post
    I believe you should be using something like this to define your Dynamic Named Range
    =OFFSET(Sheet1!$B$1,1,0,COUNTA(Sheet1!$B:$B)-1,1)

    You can test by
    • Press F5
    • Type the name of your Dynamic Named Range
    • Press OK

    Your DNR will be selected.

    Does that help?
    I don't know the correct way to do it yet because so far, I have 3 answers and 3 opinions! Thanks to all. Question... I did the F5 thing and yes, it did highlight my range. My data is in B2 to B15. It highlighted B2 to B16 (added one blank cell). Is that correct... because it is allowing for new data to be entered?

    Second question... is there no way to even know if this dynamic range exists unless you just remember it? I mean, I can press F5 and do that IF I remember the name of the dynamic named range. But what if I totally forget about it? Seems it should be displayed somewhere.

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: How do I know if Dynamic Range is working?

    It is...Control + F3 opens the name manager box

    or

    You can press F3 and it opens the paste name box so this way you know the exact spelling.

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: How do I know if Dynamic Range is working?

    look in name manager on the formula tab

  8. #8
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: How do I know if Dynamic Range is working?

    Quote Originally Posted by livemusic View Post
    I don't know the correct way to do it yet because so far, I have 3 answers and 3 opinions! Thanks to all. Question... I did the F5 thing and yes, it did highlight my range. My data is in B2 to B15. It highlighted B2 to B16 (added one blank cell). Is that correct... because it is allowing for new data to be entered?

    Second question... is there no way to even know if this dynamic range exists unless you just remember it? I mean, I can press F5 and do that IF I remember the name of the dynamic named range. But what if I totally forget about it? Seems it should be displayed somewhere.
    If you look at the replacement formula I posted, you'll see that it:
    • Starts with the title cell
    • Offsets by 1 row
    • Uses a height equal to the count of non-blank cells...minus 1 (to compensate for the title cell)

    Typically, I name my dynamic named ranges with a "DNR" prefix to make the easier to find.
    example: DNR_NameList

    Another method to help find named ranges (Using Excel 2007 or later) is to create a list of all named ranges and their definitions:
    • Select a blank cell with nothing beneath it
    • Formulas.Use_in_formula.Paste_Names...Click: Paste List

    Does that help?

  9. #9
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: How do I know if Dynamic Range is working?

    Hopefully this example sheet helps a little.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    12-14-2008
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: How do I know if Dynamic Range is working?

    Getting an error. Here is what I have done.

    1. Created a Workbook, 'wells-and-doi.xlsx'

    2. Created a Dynamic Range, 'WellNames,' in Column B. Confirmed that it exists by pressing F5 and entering the name and yes, it highlighted the range.

    3. Created another Workbook, call it Workbook2. In a certain column, I will want to enter a well name by selecting it from a Drop Down list, which will be populated by the names of the wells from the Dynamic Range in the other workbook, mentioned above.

    In this Workbook2, I created a named range by doing this...

    On the Ribbon, clicked the Formulas tab, then clicked Define Name.
    Typed a name for the List, 'WellNamesList'
    From the Scope drop down, selected Workbook
    In the refers to box, typed:

    =wells-and-doi.xlsx!WellNames

    Clicked OK

    Got it from here...
    http://blog.contextures.com/archives...#ixzz1R0UIIkj8

    4. Both workbooks are open. In Workbook2, I did this, something else I found online...

    Create the Dropdown List
    - Select the cells in which data validation will be set.
    - On the Ribbon, click the Data tab, then click Data Validation
    - In the Allow box, choose List
    - In the Source box, type an equal sign, then the list name, e.g.: =MyCustList
    - Click OK

    So, in that box, I typed '=WellNamesList.'

    ===

    When I do the last step above, it says evalutates to an error." I can't find the error.

    So, to recap, I have the first workbook (wells-and-doi.xlsx) and it contains the Dynamic Named Range 'WellNames.' I have the second work, Workbook2, which has the named range 'WellNamesList.' This named range is pointed to wells-and-doi.xlsx!WellNames. I then created a drop down list, to be populated by the named range 'WellNamesList.'
    Last edited by livemusic; 07-02-2011 at 11:53 PM. Reason: typo

+ 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