Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: no negative numbers

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a formula that can generate a negative number ie (a-b)*.2 = c. If c is a negative number I want a 0 to be placed in that cell. Is this possible? The cell is formated for currency.

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Denver, CO
    Posts
    1,743
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    you could use
    =max(0,(a-b)*.2)

  3. #3
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-22 15:16, ParrotHead wrote:
    I have a formula that can generate a negative number ie (a-b)*.2 = c. If c is a negative number I want a 0 to be placed in that cell. Is this possible? The cell is formated for currency.
    I don't know your exact formula, but

    =MAX(0,(a-b)*.2 )

    would give you what you want. This would be more eficient that an IF statement for this.

    Bye,
    Jay

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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