Forum Discussion
AlvaroMG
Oct 06, 2023Copper Contributor
Question of Data Validation
Hi, I am using Data Validation conditional to another cell content, using "Indirect" function: a drop-list will appear on cell B3 conditioned to the text selected on A3. Once a selection is made, i...
HansVogelaar
Oct 06, 2023MVP
You'd have to use VBA code for that. It would work in the desktop version of Excel for Windows and Mac, not in Excel Online or on Android and iOS. Would that be OK? If so, do the following:
- Right-click the sheet tab.
- Select 'View Code' from the context menu.
- Copy the code listed below into the worksheet module.
- Switch back to Excel.
- Save the workbook as a macro-enabled workbook (*.xlsm).
- Make sure that you allow macros when you open the workbook.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("A3"), Target) Is Nothing Then
Application.EnableEvents = False
Range("A3").Offset(0, 1).ClearContents
Application.EnableEvents = True
End If
End Sub