convert accounting negatives

If you have an extract from SAP or other accounting system and it has the negative sign at the end of the number string, you can use this macro to convert them. Highlight the cells you want converted and run the macro.


Sub Convert_Negative()
Dim cell As Range
For Each cell In Selection
If InStr(cell, "-") > 1 Then
newval = -Left(cell, InStr(cell, "-") - 1)
cell = newval
End If
Next cell

End Sub

No Comments

Leave a reply

You must be logged in to post a comment.