P
Please help James
Does anyone how to exlude a range from the code as outlined below. I need to
have "P1024" show up as blank when a user hits the delete button. Thanks!
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myCell As Range
Dim myRng As Range
Set myRng = Me.Range("E10:AK24")
Application.EnableEvents = False
For Each myCell In Intersect(Target, myRng).Cells
If myCell.Value = "" Then
myCell.Value = 0
End If
If Not Intersect(myCell, Me.Range("E10:M24")) Is Nothing Then
myCell.Value = Abs(myCell.Value)
End If
If Not Intersect(myCell, Me.Range("Q10:AH24")) Is Nothing Then
myCell.Value = -Abs(myCell.Value)
End If
Next myCell
Application.EnableEvents = True
End Sub
have "P1024" show up as blank when a user hits the delete button. Thanks!
Private Sub Worksheet_Change(ByVal Target As Range)
Dim myCell As Range
Dim myRng As Range
Set myRng = Me.Range("E10:AK24")
Application.EnableEvents = False
For Each myCell In Intersect(Target, myRng).Cells
If myCell.Value = "" Then
myCell.Value = 0
End If
If Not Intersect(myCell, Me.Range("E10:M24")) Is Nothing Then
myCell.Value = Abs(myCell.Value)
End If
If Not Intersect(myCell, Me.Range("Q10:AH24")) Is Nothing Then
myCell.Value = -Abs(myCell.Value)
End If
Next myCell
Application.EnableEvents = True
End Sub