View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Convert neg. numbers to positive numbers

Try Don's original suggestion.

-c will convert positive to negative and negative to positive.



AFSSkier wrote:

Don,

I like your example to change Neg to Pos. How do you change Pos to Neg?

I tired the following & it didn't work. I changed only the if statement.

Sub MakePosNeg()
For Each c In Range("A1:ZZ10000")
If c.Value 0 Then c.Value = c
Next c
End Sub
--
Thanks, Kevin

"Don Guillett" wrote:

How about.

Sub makenegpos()
For Each c In Range("r1:r9")
If c.Value < 0 Then c.Value = -c
Next c
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Michaelcip" wrote in message
...
I want to convert neg. numbers to positive numbers. To be clear, I don't
want them just to DISPLAY as positive but to BECOME positive. As well, I
don't want to have to had another column (the ABS() function). Thanks to
any
who can help.




--

Dave Peterson