Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 334
Default In VB how do I reverse a Negative number?

I have a calculation in Excel Cell that can create a negative zero. I would
like to change the negative to a positive in VB. How can this be done?
Rick
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default In VB how do I reverse a Negative number?

Hi Rick,

supposing x=-10

you can use:

1) -x 'to change the sign, if you know that x is always negative
2) abs(x) 'to get always positive number

Regards,
Ivan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default In VB how do I reverse a Negative number?

How do you get a negative zero? My understating is that positive and
negative is defined from zero, so zero is neither.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Rick" wrote in message
...
I have a calculation in Excel Cell that can create a negative zero. I

would
like to change the negative to a positive in VB. How can this be done?
Rick



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 400
Default In VB how do I reverse a Negative number?

How can you have a negative 0? Sounds like the display percision is showing a
non-zero as a 0.

"Rick" wrote:

I have a calculation in Excel Cell that can create a negative zero. I would
like to change the negative to a positive in VB. How can this be done?
Rick

Reply
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
Reverse if negative in 2007 scoz Charts and Charting in Excel 4 October 11th 07 11:44 AM
reverse a number Derek Excel Discussion (Misc queries) 6 July 19th 05 05:35 PM
Reverse the sign of a number in a cell epowell74 Excel Worksheet Functions 1 May 17th 05 06:32 PM
Reverse the sign of a number in a cell Peo Sjoblom Excel Worksheet Functions 0 May 17th 05 06:23 PM
2003= negative number&2004= negative number How Do I Calculate gro Jason Excel Worksheet Functions 1 January 14th 05 05:24 PM


All times are GMT +1. The time now is 03:58 PM.

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"