+ Reply to Thread
Results 1 to 8 of 8

Dynamic changing drop down

  1. #1
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Dynamic changing drop down

    I have the following code:

    Please Login or Register  to view this content.
    I tried this this and without the blank commas

    I am trying to get it to automatically adjust my defined name range for a drop down since we add new events frequently enough. I have V1 set as the 'EventAnchor' named range but I can't figure out why it keeps returning 21 rows of events when I am testing with only 3 events.

    Column V
    V1: Events (just the title of the list and the anchor cell I am using)
    V2: Event 1
    V3: Event 2
    V4: Event 3
    Remainder of the column is empty

    If I input
    Please Login or Register  to view this content.
    I get 4.

    It originally looked liek it was working when the name manager highlighted the area but now I keep getting too many cells returned

    Any help would be appreciated.

    Thanks again,
    smls

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Dynamic changing drop down

    Remainder of the column is empty
    Are you sure its empty?
    Try the =counta(V:V) on its own and see what it gives you
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Dynamic changing drop down

    hmm wait, in your offset...
    OFFSET(EventAnchor,COUNTA(DropDowns!V:V),,,)
    you are using COUNTA() to determine the starting point or the offset?

  4. #4
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Re: Dynamic changing drop down

    Hey FDibbins,

    I did, with just =counta(V:V) I am getting 4.

    I can't figure out why I am getting 4 there but getting 2:21 back in my named range list.

    I am probably missing something obvious but it's driving me crazy

  5. #5
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Re: Dynamic changing drop down

    I was trying to use the counta to determine the row height to offset. The idea was the get the range by starting in V1 then offsetting from V1 to the last non blank cell in col V.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Dynamic changing drop down

    Why not just have the whole range determined by the OFFSET?

    Perhaps adapt 1 of these...
    1:Expand Down as Many Rows as There are Numeric Entries.
    *** In the Refers to box type: =OFFSET($A$1,0,0,COUNT($A:$A),1)
    2:Expand Down as Many Rows as There are Numeric and Text Entries.
    *** In the Refers to box type: =OFFSET($A$1,0,0,COUNTA($A:$A),1)

    You could use DropDowns!$V$2 as the start OF THE offset...
    =offset(DropDowns!$V$2,..............................

  7. #7
    Forum Contributor
    Join Date
    05-14-2012
    Location
    USA
    MS-Off Ver
    Excel 2013
    Posts
    186

    Re: Dynamic changing drop down

    Wow, there we go, I was making it was too complicated apparently. That worked and makes more sense. I guess I was trying to make it work the other way and just couldn't figure it out so I got stuck on it.

    Much appreciated.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Dynamic changing drop down

    Often happens Glad to help and thanks for the feedback

+ 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. Code optimization and Dynamic changing
    By Emma_B in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-08-2014, 11:52 AM
  2. changing macro to dynamic
    By flunzy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-13-2013, 09:45 AM
  3. Changing / dynamic promppt box within Macro
    By jbench18 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2012, 12:42 PM
  4. [SOLVED] Dynamic Ranges as drop down lists based on another drop down list
    By Excel_Beginner_1 in forum Excel General
    Replies: 4
    Last Post: 05-15-2012, 03:31 PM
  5. YValues in Dynamic Chart changing to =[0]!
    By agrajag42 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-09-2009, 04:24 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