Hi guys,
I found script which trigger the macro when they are changed
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
Set KeyCells = Range("B24:B26")
If Not _
Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing _
Then
Call cell_value
End If
End Sub
But this actually not what I need
I need 1 more line which will check if any of cells in range B24:B26 is equal to "None" and if "yes" then do nothing if "No" then do same think that above script is doing.
I tried to change it by myself but it is not working
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
If ActiveSheet.Range("B24").Value = "None" _
Or ActiveSheet.Range("B25").Value = "None" _
Or ActiveSheet.Range("B26").Value = "None" _
Then
' do nothing
Else
Set KeyCells = Range("B24:B26")
If Not _
Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing _
Then
Call cell_value
End If
End If
End Sub
Can some one correct this?
Thank you
Bookmarks