PDA

View Full Version : Solved: Covert number to absolute value



mduff
05-28-2009, 10:07 AM
Hi,

Covert number to absolute value
I have a list of data that has positive and negative numbers what I am looking for is code that will convert the number in a range let’s say F2:F20000 for example to its absolute value (positive number) I Know I cod insert a new column and add the ABS functions but what I am looking for is to avoid the step and directly concert the values to it ABS


Thanks in advance

Bob Phillips
05-28-2009, 10:31 AM
Untested


Dim cell As Range

Application.Screenupdating = False

With Activesheet

For Each cell In .TRange("F2:F2000")

Cell.Value = Abs(cell.Value)
Next Cell
End With

Application.Screenupdating = True

mduff
05-28-2009, 11:26 AM
thank you very much