sgmpatnaik
Active Member
Hi Good Morning
i have a small problem and i was stuck in there, that is
i want to change the Number to negative and Positive using with specific text
for that i create one code that is
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 2 Then
If Range("A" & Target.Row) = "Damage" Or Range("A" & Target.Row) = "Shortage" Then
Target = -1 * Abs(Target)
End If
End If
Application.EnableEvents = True
End Sub
With This code i am getting the Negative Number with Specific Text but when i remove or delete the Specific Text then the Number is still in negative Mode but i want to change the number to Positive Mode
Kindly Help
Regards
SP
i have a small problem and i was stuck in there, that is
i want to change the Number to negative and Positive using with specific text
for that i create one code that is
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 2 Then
If Range("A" & Target.Row) = "Damage" Or Range("A" & Target.Row) = "Shortage" Then
Target = -1 * Abs(Target)
End If
End If
Application.EnableEvents = True
End Sub
With This code i am getting the Negative Number with Specific Text but when i remove or delete the Specific Text then the Number is still in negative Mode but i want to change the number to Positive Mode
Kindly Help
Regards
SP