Thursday 17 December 2015

Macro to interchange (+) positive to (-) negative and vice-versa


Sub change()

 
On Error Resume Next

 For Each cell In Range("E1:e20")

If Not cell.Value Like "-" & "*" Then

cell.Value = "-" & cell.Value

Else

cell.Value = Abs(cell.Value)

End If

Next cell

End Sub

No comments:

Post a Comment