Solved Formula and enter data at the same cell

June 22, 2017 at 17:30:02
Specs: Windows 7
Hi,

I want make if cell A1 is saying "NO" , it will delete all the value in cell B1 and if the cell A1 is saying "YES" then I can enter number in cell B1.

message edited by fdecmc7


See More: Formula and enter data at the same cell

Reply ↓  Report •

#1
June 22, 2017 at 19:46:54
✔ Best Answer
The only way to accomplish what you want is with a macro. Formulas can't delete data and you can't enter data in the same cell as a formula without the formula going away.

This macro should do what you want:

Private Sub Worksheet_Change(ByVal Target As Range)
 If Target.Address = "$A$1" And Target = "No" Then
  Range("B1") = ""
 End If
End Sub

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.


Reply ↓  Report •

#2
June 22, 2017 at 20:41:11
great!! it works.. im very lack of skill in excel.. Thanks mate!!

Reply ↓  Report •
Related Solutions


Ask Question