Hi
In an excel sheet I have built some dynamic selection lists where the tier1 selection drives the tier2 & tier 3 available lists (tier 3 is a static list that has the same 7 entries for all tier 2 responses, which are also valid for all tier1 responses). At the moment only valid values for the tier2 field appear when tier1 is populated from a list.
I'm now trying to complete add some validation logic & automated corrections to update the sheet (tier2 & tier3 field) if and when the validation.value for tier2 is False. Is there a way to use the validation.value check to determine/select a cell and then update the tier3 value
Code I've been playing with attached below, the Active.Cell select statement picks the first cell in the defined range, not the cell detected as invalid, is there a way to move the select to the invalid data cell and loop down the range clearing all related tier3 values before clearing all invalid tier2 values
Sub DeleteInvalidData()
'Columns("M:M").Select
Range("M1:O20").Select
Dim C As Range
For Each C In Selection
'changes column 2 row 1 only
If C.Validation.Value = False Then ActiveCell.Select
ActiveCell.Offset(0, 2).Value = "Choose..."
'removes invalid entry values from range
If C.Validation.Value = False Then C.Value = ""
Next
End Sub
Thanks
Bookmarks