Consulting

Results 1 to 5 of 5

Thread: Fill data validation cell

  1. #1

    Fill data validation cell

    In the attached file, the sheet named Validation contains Data Validation List.

    The drop down for cell B1 is dependant on Cell A1.

    If in cell A1, Vegetable is selected then the drop down list in cell B1 shows items related to Vegetables only.

    If I change the cell A! from Vegetable to NA, the cell B1 keeps the earlier value say Potato ( ie the value that was chosen when the cell A1 = Vegetable).
    I want that if the value at cell A1 is changed to NA the value at cell A! should also change to Blank or NA automatically.

    How this can be done?



  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    .
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    thanks xld, but can a non macro solution be provided?

    the given macro works for one cell ie A1 only. Now i want to extend the cells in Column A. What will be modified macro now

    File attached.

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]


    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 1 Then
    Target.Offset(0, 1).Value = ""
    End If
    End Sub
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    Thanks its working great.
    Is macro the only solution to it?
    Any non macro solution . . . ..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •