+ Reply to Thread
Results 1 to 6 of 6

Validating a cell

  1. #1
    Registered User
    Join Date
    03-24-2006
    Posts
    45

    Validating a cell

    Hello,

    I have 2 cells. Both cells have a list type validation (i.e. cell 1 has option of X or blank, while cell 2 has options of 1, 2, 3, 4, or 5). I want the 2nd cell to be un-editable until the 1st cell has a value.

    Any ideas?

    Thanks

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See link

    http://www.contextures.com/xlDataVal02.html

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    03-24-2006
    Posts
    45

    Validating a cell

    Thank you for your reply and useful link.

    How does this work though if you have more than one cell that you want un-editable if the first cell does not have the correct value?

    e.g. Cell 1 = ""
    Cell 2 = ""
    Cell 3 = ""
    ....

    while:
    Cell 1 = "X"
    Cell 2 = "1, 2, 3"
    Cell 3 = "red, blue, green, yellow"
    ...


    Quote Originally Posted by VBA Noob

  4. #4
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by m.cain
    Thank you for your reply and useful link.

    How does this work though if you have more than one cell that you want un-editable if the first cell does not have the correct value?

    e.g. Cell 1 = ""
    Cell 2 = ""
    Cell 3 = ""
    ....

    while:
    Cell 1 = "X"
    Cell 2 = "1, 2, 3"
    Cell 3 = "red, blue, green, yellow"
    ...
    If cell A1 contain the optoin of X or blank
    Then apply Custom Data Validation in A2 as

    Please Login or Register  to view this content.
    remember to uncheck the Ignore blank option.

    And in cell A3 use this Custom formula

    Please Login or Register  to view this content.
    remember to uncheck the Ignore blank option.

    ----edit-----
    formulas wrapped
    Last edited by starguy; 09-28-2007 at 01:39 AM.

  5. #5
    Registered User
    Join Date
    03-24-2006
    Posts
    45
    Quote Originally Posted by starguy
    If cell A1 contain the optoin of X or blank
    Then apply Custom Data Validation in A2 as

    Please Login or Register  to view this content.
    remember to uncheck the Ignore blank option.

    And in cell A3 use this Custom formula

    Please Login or Register  to view this content.
    remember to uncheck the Ignore blank option.

    ----edit-----
    formulas wrapped
    Thank you for your advice. In the end I used a bit of both.

    In an empty column (which I later hid) I placed the list of entries for A1 (i.e. " " and "X"), a list of entries for A2 (1, 2, 3), and a list of entries for A3 (red, blue, green, yellow).

    I then created a List Validation for each cell (A1, A2, A3), referencing their respective lists.

    For Cells A2 and A3 though, for the List source I entered an if statement such as:
    Please Login or Register  to view this content.
    - where $Y$54:$Y$57 indicated where the list was located, and where no entry was permitted in A4 for a value to be selected in A2 or A3.

    Thank you once again for your advice. It was much appreciated.

  6. #6
    Registered User
    Join Date
    06-13-2011
    Location
    Minneapolis, MN
    MS-Off Ver
    Excel 2011 (Mac)
    Posts
    12

    Validating a cell

    I am trying to create a drop down list using a table from another sheet. I have named the array, and when I try to validate it using the name, I get an error that says the formula you have typed contains an error. I have a table named as "Expense" and i receive that error when I type =ExpenseLookup into the source.

+ 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