View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson[_2_] Chip Pearson[_2_] is offline
external usenet poster
 
Posts: 95
Default Convert -ve numbers to +ve

Ali,

Try something like the following:

Sub MakePositive()
Dim Rng As Range
For Each Rng In
ActiveSheet.UsedRange.SpecialCells(xlCellTypeConst ants,
xlNumbers)
If Rng.Value < 0 Then
Rng.Value = Abs(Rng.Value)
End If
Next Rng
End Sub


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"ali" wrote in message
...

I often have to work with sheets that contain awkward negative

numbers
and it would make my life much easier if i could use a macro

that would
search a column and convert any negative numbers into positive
numbers.

Can anyone help my with how i can do this please?

Alternatively if anyone can tell me how to convert positive

numbers to
negative that would be equally useful.

Many thanks


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from

http://www.ExcelForum.com/