Results 1 to 3 of 3

Thread: How to ignore blank cell in a range while using Data Validation

  1. #1
    Join Date
    Oct 2011
    Posts
    93

    How to ignore blank cell in a range while using Data Validation

    I am using dependent data validation in cell ‘Sheet2!$B2’. It’s formula is ‘=INDIRECT($A2)’. The drop down menu in ‘Sheet2!$B2’ then references a named range in ‘Sheet1!$L:$L’, which at times has one or more blank cells at the top of the column. I would like to ignore the blank cells in the column so that only the populated cells in the named range appear in the drop down menu. I acquired the following formula from the net to replace ‘Sheet1!$L:$L’ in the name manager, but I am unable to make it work.
    • =OFFSET(Sheet1!$L$2,0,0,MATCH("*",Sheet1!$L$2:$L$1 00,-1),1)

  2. #2
    Join Date
    Jul 2011
    Posts
    623

    Re: How to ignore blank cell in a range while using Data Validation

    Try the following : =OFFSET(Sheet1!$L$2,COUNTBLANK(OFFSET(Sheet1!$L$2, 0,0,COUNTA(Sheet1!$L:$L),1)),0,COUNTA(Sheet1!$L:$L )-1,1). Any blank cells inside the non-blank range will be counted because of the COUNTBLANK function so the starting reference will go down further.

  3. #3
    Join Date
    Jul 2011
    Posts
    634

    Re: How to ignore blank cell in a range while using Data Validation

    Could you please confirm that I’m doing the right thing. I am using Excel 2007. I hit ctrl-F3 to bring up the Name Manager. I select the named range in question, hit edit and enter =OFFSET(Sheet1!$L$2,COUNTBLANK(OFFSET(Sheet1!$L$2,0,0,COUNTA(Sheet1!$L:$L),1)),0,COUNTA(Sheet1!$L:$L )-1,1) into the ‘Refer To:’ box. This also removes the name of this range from the name box. After doing the above, the drop down menu does nothing. It displays the arrow to the right hand side of the cell, but that’s it. The formula in the dependent data validation cell is ‘INDIRECT($A2) where ‘A2’ displays the name of the named range in question.

Similar Threads

  1. Replies: 2
    Last Post: 22-01-2012, 11:59 AM
  2. Multiple columns Data Validation in drop down
    By McKenzie! in forum Software Development
    Replies: 6
    Last Post: 16-07-2011, 10:52 AM
  3. Avoid Copy paste over Data Validation cell
    By Bryant in forum Software Development
    Replies: 7
    Last Post: 15-07-2011, 10:44 AM
  4. Data Validation in Visual Basic 6.0
    By Aidan 12 in forum Software Development
    Replies: 5
    Last Post: 04-03-2011, 05:25 AM
  5. Disable cell validation on form DataGridView
    By Chandrakant81 in forum Software Development
    Replies: 3
    Last Post: 06-02-2009, 05:52 PM

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
  •  
Page generated in 1,713,470,799.71241 seconds with 17 queries