This macro is very similar to the macro that trims column values. Instead of using the trim function, I have used the ABS function. You can also change this code to work on row values, as demonstrated by my previous example.
Sub changecoltoabs()
Dim rowcnt As Long
ActiveSheet.range(ActiveCell, ActiveCell.End(xlDown)).Select
rowcnt = Selection.Rows.Count
For i = 1 To rowcnt
ActiveCell.Cells(i).Value = Abs(ActiveCell.Cells(i).Value)
Next i
End Sub
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment