ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Private Sub Worksheet_Change(ByVal Target As Excel.Range) (https://www.excelbanter.com/excel-worksheet-functions/123377-private-sub-worksheet_change-byval-target-excel-range.html)

[email protected]

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
 
I have attached below and the result in Cell B5=Enter Something

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address = "$B$5" Then
If Len(Target.Value) = 0 Then Target.Value = "Enter Something"
End If
End Sub

Question: In Cell B6 can I use some kind of formula resulting in "Enter New
Code" along with the same formula above.

Meaning:
Same worksheet:
B5=Enter Something
B6=Enter New Code

Additional: Example of Result
Same worksheet:
B5=Enter Something
B6=Enter New Code
C1 to C2=Enter Old Code
E1=Help Me.

Thanks a bundle.




All times are GMT +1. The time now is 02:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com