+ Reply to Thread
Results 1 to 6 of 6

data validation question

  1. #1
    Registered User
    Join Date
    11-05-2007
    Posts
    30

    data validation question

    Hi,

    A B ...
    X M
    Y
    Z
    0
    0
    0
    ...

    here is my question:in cell B1 (M above), i need to do a data validation list formula of col A, but only those that have a value AND not equal to 0. Now each cell in col A contains a formula that may return a string(eg X Y Z),"" or 0.

    i can easily get rid of the 0's by making them " ", but the blanks still get included in the list.

    i tried this formula in Data validation > Allow List > source field:

    =OFFSET(sheet1!$A$1,0,0,COUNTA(sheet1!$A$1:$A$100),1)

    any help much appreciated...

    helpplease!

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Assuming only text strings are valid....try:

    =A1:INDEX(A:A,MATCH(REPT("Z",255),A:A))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    11-05-2007
    Posts
    30
    that worked thanks!

  4. #4
    Registered User
    Join Date
    11-05-2007
    Posts
    30
    hmmm is "" considered a text string? because it is now included which i don't want...

    i have changed all 0's to "" so as not to be displayed, but the blanks are now showing in the data validation selection.

    any ideas?

    thanks,

    helpplease!

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try instead:

    =A1:INDEX(A1:A65534,MATCH(2,1/(A1:A65534<>"")))

    this will not eliminate blanks within the range though...it only goes to the last text (no blank) string.

  6. #6
    Registered User
    Join Date
    11-05-2007
    Posts
    30
    genius! a prerequisite is that there are no blanks in between the range so that is fine...
    Last edited by helpplease!; 11-13-2007 at 05:37 PM.

+ 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