PDA

View Full Version : Positive



oleg_v
11-30-2010, 01:44 AM
Hi
i need a help with a macro to make all the numbers in the range A1:H100

positive numbers

thanks

Bob Phillips
11-30-2010, 02:56 AM
What numbers will they be? Random, structured?

JKwan
11-30-2010, 10:51 AM
how about using the ABS() function?

Kenneth Hobs
11-30-2010, 03:33 PM
Sub test()
Dim x As String
x = "A1:H100"
Range(x).Value = Evaluate("if(isnumber(" & x & "),abs(" & x & ")," & x & ")")
End Sub