LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Converting all numbers to negative

If you have numbers already in a range, select the range and run this macro

Sub TryNow()
Dim myCell As Range
For Each myCell In Selection
If IsNumeric(myCell.Value) And (Not IsEmpty(myCell)) Then
myCell.Value = -Abs(myCell.Value)
End If
Next myCell
End Sub

HTH,
Bernie
MS Excel MVP


"Please help James" wrote in message
...
Does anyone know how to create a code that would convert all numbers entered
into a range of cells into a negative number? -ABS Thanks!



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
converting positive numbers to negative numbers dmantzaaa Excel Discussion (Misc queries) 1 January 29th 09 11:45 PM
Converting Negative Numbers to Positive bmmclen Excel Discussion (Misc queries) 9 February 8th 07 08:34 AM
converting hex values to negative numbers Michael_Braganza Excel Discussion (Misc queries) 2 December 11th 06 09:12 AM
Converting positive numbers to negative numbers Treg67 Excel Worksheet Functions 4 July 17th 06 03:57 PM
converting text to negative numbers! via135 Excel Worksheet Functions 6 February 5th 06 06:29 AM


All times are GMT +1. The time now is 07:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"