+ Reply to Thread
Results 1 to 5 of 5

Ignoring blanks in a dynamic named range

  1. #1
    Forum Contributor
    Join Date
    09-30-2008
    Location
    Eau Claire, WI
    Posts
    184

    Ignoring blanks in a dynamic named range

    I used each of the following codes for dynamic name ranges.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    And each one ignores blanks at the END of the list. I have a list that users can change the names in and delete names. I have a dropdown list that is validated based on this list, and it needs to ignore blanks IN THE MIDDLE of the list as well. So no matter what cells they clear or rearrange, the dropdown list will only contain any cells with a value in it and ignore all blanks. The list is in L4:L27 on the INPUT worksheet.

    This is Excel 2007 and the worksheet and cell references at the top are accurate for my worksheet. Thanks!
    Last edited by jman0707; 10-14-2008 at 10:54 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    08-26-2008
    Location
    singapore
    Posts
    626
    Here is a way
    First, use the following formula to generate a new list without blank cells
    Please Login or Register  to view this content.
    Then defined your dynamic name base on the new list
    I need your support to add reputations if my solution works.


  3. #3
    Forum Contributor
    Join Date
    09-30-2008
    Location
    Eau Claire, WI
    Posts
    184
    Can you explain the steps to do this in a little more detail? I didn't quite follow. My list is from L4 to L27, and then when users delete names within there, I'd like the range to ignore those so when I validate another cell on another worksheet with a dropdown referencing this list, I'd like the blanks in between not to show up.

    I went to Formulas > Define Name and pasted this code in (your code, but with all the A1:A100 switched to L4:L27).

    Please Login or Register  to view this content.
    I called the list "Products2." Then I went to the cell where I wanted the dropdown list to show up. I went to Data Validation and selected "List" and for the list name I put =Products2. It then told me that there was an error in the formula of the list. So I'm not sure if I even did it right. Any feedback will be great, thanks!

  4. #4
    Valued Forum Contributor
    Join Date
    08-26-2008
    Location
    singapore
    Posts
    626
    For your range L4 to L27
    Use this
    Please Login or Register  to view this content.
    Then copy down

    Define name , eg ABC
    Please Login or Register  to view this content.
    Then make your validation list , source "=ABC"

  5. #5
    Forum Contributor
    Join Date
    09-30-2008
    Location
    Eau Claire, WI
    Posts
    184
    In this code
    Please Login or Register  to view this content.
    after Index, is that "L1" supposed to be "L4"? Am I pasting this in some cell (M4 or some other) near L4 to create another list, and this new list will be the source of my data validation? I tried dragging it down from M4 to M27 and I got #NUM! for all but the first cell. I'm guessing some of the dollar signs might need to be removed??

    And do I paste this code in the "define range" area to create the new list for validation?
    Please Login or Register  to view this content.
    Sorry, I just need more of a step by step because I need to ensure I have cells open to paste more formula into, and I need to know where each of the codes you gave me goes. Thanks!

+ 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. Using Named Range in VBA
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-25-2008, 06:51 PM
  2. Dynamic Named Range not re-evaluated
    By neilg_cebu in forum Excel Charting & Pivots
    Replies: 11
    Last Post: 06-23-2008, 06:52 AM
  3. Pivot tables & dynamic named ranges
    By WillysK5 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-05-2008, 04:32 PM
  4. Find out what named range a cell is part of
    By pizzett in forum Excel General
    Replies: 1
    Last Post: 07-25-2007, 10:44 AM
  5. Replies: 0
    Last Post: 09-11-2006, 10:40 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