In VB how do I reverse a Negative number?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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)
 
How can you have a negative 0? Sounds like the display percision is showing a
non-zero as a 0.
 
Back
Top