View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Data Validation - Dependent Lists & Conditional Formatting

You'd need VBA code to effect what you want.

Try working with this and post back with any questions

Assumptions:
Parent List cells are in A1:A10
Dependent List cells are in B10

Copy the below VBA code into the sheet module of the worksheet with the Data
Validation.

You get there this way:
Right-Click on the sheet tab
Select "View Code"

'----------Start of Code------------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngAllParentCells As Range
Dim rngDepCells As Range
Dim rngCell As Range

Set rngAllParentCells = Range("A1:A10")
Set rngDepCells = Intersect(Target, rngAllParentCells)

If Not rngDepCells Is Nothing Then
For Each rngCell In rngDepCells.Cells
'Move 1 cell to the right and clear contents
rngCell.Offset(RowOffset:=0, ColumnOffset:=1).ClearContents
Next rngCell
End If

Set rngAllParentCells = Nothing
Set rngDepCells = Nothing
Set rngCell = Nothing

End Sub
'----------End of Code------------

Now....whenever one of the A1:A10 DV cells is changed,
the corresponding B1:B10 cell is cleared

Does that help?

***********
Regards,
Ron

XL2002, WinXP


"Shelly" wrote:

I used Ron's formula below, with success, but I would like something little
different.

I would like the B1 cell (dependent list) to be blank if the A1 cell is
changed after the B1 cell has been completed.

So, a user enters a value in A1, the list in B1 is restricted. They select
something from B1. They they go back to A1 and either change the value or
delete the value - at this point I would like B1 to go blank.

Any ideas?

THANKS