+ Reply to Thread
Results 1 to 4 of 4

In VB how do I reverse a Negative number?

  1. #1
    Rick
    Guest

    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. #2
    Ivan Raiminius
    Guest

    Re: 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. #3
    Bob Phillips
    Guest

    Re: 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" <Rick@discussions.microsoft.com> wrote in message
    news:EE85EE2E-FEFE-462F-9D29-EE8A373865C3@microsoft.com...
    > 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. #4
    AA2e72E
    Guest

    RE: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1