Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: count negative cells

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

    Default

    I have a column of both positive and negative Numbers That I would like to count the number of total +numbers as well as the number of -numbers
    +number formulas would be in one cell and -number formulas would be in another cell . Can anyone help me with the formulas?

  2. #2
    Board Regular Brian from Maui's Avatar
    Join Date
    Feb 2002
    Posts
    8,450
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    =countif(range,"<0")
    =countif(range,">0")

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Millbank, London, UK
    Posts
    1,790
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    for the pure mathematicians :

    is "0" positive or negative ?

    or is it neither ?

    thanks
    Chris

  4. #4
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    84,045
    Post Thanks / Like
    Mentioned
    38 Post(s)
    Tagged
    8 Thread(s)

    Default

    On 2002-05-08 11:41, Chris Davison wrote:
    for the pure mathematicians :

    is "0" positive or negative ?

    or is it neither ?

    thanks
    Chris
    Neither.

    Impure Mathematician


  5. #5
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-05-08 11:41, Chris Davison wrote:
    for the pure mathematicians :

    is "0" positive or negative ?

    or is it neither ?

    thanks
    Chris
    According to Merriam-Webster Online m-w.com...

    Main Entry: 1positive
    Pronunciation: 'p-z&-tiv, 'pz-tiv
    Function: adjective
    Etymology: Middle English, from Middle French positif, from Latin positivus, from positus, past participle of ponere
    Date: 14th century

    4e : real and numerically greater than zero <+2 is a positive integer>


    [ This Message was edited by: Mark W. on 2002-05-08 11:49 ]

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

    Default

    [/quote]

    According to Merriam-Webster Online m-w.com...

    Main Entry: 1positive
    Pronunciation: 'p-z&-tiv, 'pz-tiv
    Function: adjective
    Etymology: Middle English, from Middle French positif, from Latin positivus, from positus, past participle of ponere
    Date: 14th century

    4e : real and numerically greater than zero <+2 is a positive integer>


    [ This Message was edited by: Mark W. on 2002-05-08 11:49 ]
    [/quote]

    According to Bill Gates zero is even.
    =iseven(0)

    And if that's the way bill wants it, I guess that's the way it is!

  7. #7
    MrExcel MVP
    Join Date
    Mar 2002
    Location
    Michigan USA
    Posts
    11,454
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-05-08 11:41, Chris Davison wrote:
    for the pure mathematicians :

    is "0" positive or negative ?

    or is it neither ?

    thanks
    Chris
    Chris, another way of putting it might be to say, 0 is on the fence, on one side of 0 are positive numbers and on the other side of 0 are negative numbers;

    You must cross the fence to go from one side to the other -- so if you must change sides, you have got to bear 0's scrutiny!

    Regards!

  8. #8
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    84,045
    Post Thanks / Like
    Mentioned
    38 Post(s)
    Tagged
    8 Thread(s)

    Default


    On 2002-05-08 12:26, IML wrote:
    According to Bill Gates zero is even.
    =iseven(0)

    And if that's the way bill wants it, I guess that's the way it is!


    Check also

    =ISEVEN(-4)

    I believe ISEVEN does not allow one to conclude that 0 should be or is a positive integer/number.

    Postscript: The loveliest of all programming languages (my bias) LISP has the following predicates:

    zerop number

    "This predicate is true if number is zero (either the integer zero, a floating-point zero, or a complex zero), and is false otherwise. regardless of whether an implemetation provides distinct representations for positive and negative floating-point zeros,
    (zerop -0.0) is always true. it is an error if the argument number is not a number."

    plusp number

    "This predicate is true if number is strictly greater than zero, and is false otherwise. It is an error if the argument number is not a non-complex number."

    minusp number

    "This predicate is true if number is strictly less than zero, and is false otherwise. Regardless of whether an implementation provides distinct representations for positive and negative floating-point zeros,
    (minusp -0.0) is always false. (the function float-sign may be used to distinguish a negative zero.) It is an error if the argument number is not a non-complex number." [ Steele, G. (1984). Common Lisp: The language, pp. 195-196. ]

    Aladin



    [ This Message was edited by: Aladin Akyurek on 2002-05-08 13:12 ]

    [ This Message was edited by: Aladin Akyurek on 2002-05-08 13:15 ]

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

    Default

    On 2002-05-08 12:35, Aladin Akyurek wrote:

    On 2002-05-08 12:26, IML wrote:
    According to Bill Gates zero is even.
    =iseven(0)

    And if that's the way bill wants it, I guess that's the way it is!


    Check also

    =ISEVEN(-4)

    I believe ISEVEN does not allow one to conclude that 0 should be or is a positive integer/number.

    Aladin

    Agreed, I was just poking fun at Mr Gates. Funny how =iseven calcs on negatives (when it shouldn't?) and cases like =mround(10,-2) (which should seem to be allowed) error out. go figure.

  10. #10
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    84,045
    Post Thanks / Like
    Mentioned
    38 Post(s)
    Tagged
    8 Thread(s)

    Default

    On 2002-05-08 12:59, IML wrote:
    On 2002-05-08 12:35, Aladin Akyurek wrote:

    On 2002-05-08 12:26, IML wrote:
    According to Bill Gates zero is even.
    =iseven(0)

    And if that's the way bill wants it, I guess that's the way it is!


    Check also

    =ISEVEN(-4)

    I believe ISEVEN does not allow one to conclude that 0 should be or is a positive integer/number.

    Aladin

    Agreed, I was just poking fun at Mr Gates. Funny how =iseven calcs on negatives (when it shouldn't?) and cases like =mround(10,-2) (which should seem to be allowed) error out. go figure.
    Funny how =iseven calcs on negatives (when it shouldn't?)

    Ian: In fact, it should. Its counterpart in LISP is evenp.

    evenp integer

    "This predicate is true if the argument integer is even (divisible by two), and otherwise is false. It is an error if the argument is not an integer." [ Again, from Steele, p. 196 ]

    Aladin

    [ This Message was edited by: Aladin Akyurek on 2002-05-08 13:22 ]

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
  •