Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Transform positive numbers into negative
Hi All,
Does anyone know which statement to use for changing a range of positive numbers (say range("A1:A10") into negative? Thanks again! Rgds, Robert |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Transform positive numbers into negative
Hi Robert
Maybe: Set rng = Range("A1:A10") rng.Value = Evaluate(rng.Address & "*-1") Hope this helps! Richard On 14 Feb, 13:39, "Robert" wrote: Hi All, Does anyone know which statement to use for changing a range of positive numbers (say range("A1:A10") into negative? Thanks again! Rgds, Robert |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Transform positive numbers into negative
try
Sub changepostoneg() For Each c In Range("a1:a10") If c 0 Then c.Value = -c Next End Sub -- Don Guillett SalesAid Software "Robert" wrote in message oups.com... Hi All, Does anyone know which statement to use for changing a range of positive numbers (say range("A1:A10") into negative? Thanks again! Rgds, Robert |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Transform positive numbers into negative
One more - manually (or record macro)
copy a cell containing -1 select cells to be negated PasteSpecial multiply Regards, Peter T "Robert" wrote in message oups.com... Hi All, Does anyone know which statement to use for changing a range of positive numbers (say range("A1:A10") into negative? Thanks again! Rgds, Robert |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Transform positive numbers into negative
Sub PositivetoNegative()
Range("A1").Activate Do If Left(Activecell,1) < "-" then Activecell = Activecell*-1 End If Activecell.Offset(1,0).Activate Loop until Activecell = "" End Sub -- Best wishes, Jim "Robert" wrote: Hi All, Does anyone know which statement to use for changing a range of positive numbers (say range("A1:A10") into negative? Thanks again! Rgds, Robert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel, change column of negative numbers to positive numbers? | New Users to Excel | |||
Excel 2002 : Convert Positive Numbers to Negative Numbers ? | Excel Discussion (Misc queries) | |||
change 2000 cells (negative numbers) into positive numbers | Excel Worksheet Functions | |||
convert negative numbers to positive numbers and vice versa | Excel Worksheet Functions | |||
How to change a series of positive numbers to negative numbers | Excel Worksheet Functions |