MrExcel Consulting
Your One Stop for Excel Tips & Solutions

Changing a column of negitive numbers to positive


Posted by Jason Head on August 31, 2001 9:28 PM

How would some one change a virtical column of negitive numbers to positive at one time so you don't have to change the field data one by one?

Posted by Damon Ostrander on August 31, 2001 11:01 PM

Hi Jason,

Just select the column or the range containing the numbers and run the macro:

Sub Positive
' Takes the absolute values of all the numbers
' in the selected range.
Dim Cel As Range
For Each Cel In Selection
If IsNumeric(Cel.Value) Then
Cel.Value = Abs(Cel.Value)
End If
Next Cel
End Sub

Posted by Mark W. on September 01, 2001 2:21 PM

Simply...

...do an Edit | Replace (Control+H) changing all
occurances of the minus sign, -, with nothing.

Posted by Larry Bruce on September 02, 2001 6:00 AM

Simplest answer: Go to any blank cell and enter
"-1" (without the quotes). Now select that cell and perform a "copy". Next select the entire range of Negative Numbers you'd like to convert. Finally, perform an Edit/Paste Special, Multiply.
Done!

Posted by Mark W. on September 02, 2001 8:16 AM

Simpliest?...

Try beating...

Control+H, "-", and 1 mouse click!

When you do the comparison don't forget the time/effort
needed to clear the -1 you entered.