Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Whats the VB code to make numbers negative?
I need the following column negative: AP9:AP3 -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
one way: try something like the following sub foo() dim rng as range dim cell as range set rng = activesheet.range("AP9:AP39) for each cell in rng if cell.value0 then cell.value = -cell.value end if next end sub -- Regards Frank Kabel Frankfurt, Germany Whats the VB code to make numbers negative? I need the following column negative: AP9:AP39 --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like
Dim Rng As Range For Each Rng In Range("AP9:AP39") Rng.Value = Rng.Value * -1 Next Rng -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "alexm999 " wrote in message ... Whats the VB code to make numbers negative? I need the following column negative: AP9:AP39 --- Message posted from http://www.ExcelForum.com/ |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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) | |||
Set negative numbers to zero. Do not calculate with negative valu | Excel Discussion (Misc queries) | |||
Excel Formula - Add column of numbers but ignore negative numbers | Excel Worksheet Functions | |||
convert negative numbers to positive numbers and vice versa | Excel Worksheet Functions |