I would like to clear the contents of a cell in an Excel worksheet from
another cell in the same worksheet based on the content of that other cell.
Stating it in words: if cell A2 equals 1 then set cell A1 equal to "blank".
Is there a simple way to do this? I am using cell A1 for input by the user
therefore A1 cannot contain an equation.
David Hepner - 26 Sep 2005 19:33 GMT
You could use this VBA code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("A2").Value = 1 Then Range("A1").Value = ""
End Sub
> I would like to clear the contents of a cell in an Excel worksheet from
> another cell in the same worksheet based on the content of that other cell.
> Stating it in words: if cell A2 equals 1 then set cell A1 equal to "blank".
> Is there a simple way to do this? I am using cell A1 for input by the user
> therefore A1 cannot contain an equation.