+ Reply to Thread
Results 1 to 9 of 9

How do I count the number of cells with negative values in a series

  1. #1
    Registered User
    Join Date
    09-29-2005
    Posts
    74

    How do I count the number of cells with negative values in a series

    If the number in column A = negative, I want to count the number of negative occurances in a row starting with column A.

    -1% 1% -1% 0% 0% -2% -3% -6% -3% -1% -1% 1% -1% = 1
    -1% -1% 0% 0% -2% -3% -6% -3% -1% -1% 1% -1% = 2

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: How do I count the number of cells with negative values in a series

    =countif() or =sumif()

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

  3. #3
    Registered User
    Join Date
    09-29-2005
    Posts
    74

    Re: How do I count the number of cells with negative values in a series

    those formulas count the number of negatives in a range. I'm looking to count negative cells in a series if column A is negative.
    so in line 1 of the below example, the negative values in a series would be 1.
    Attached Files Attached Files
    Last edited by Scorpvin; 10-15-2019 at 02:56 PM.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How do I count the number of cells with negative values in a series

    so in line 1 of the below example, the negative values in a series would be 1.
    I am confused.

    So why does the 'Result' column show "=3"?

    Please walk us through how you are arriving at the numbers you do.
    Dave

  5. #5
    Registered User
    Join Date
    09-29-2005
    Posts
    74

    Re: How do I count the number of cells with negative values in a series

    the count equals 3 because A2, B2, C3 are negative. Cell D4 is positive so the count should end there.

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How do I count the number of cells with negative values in a series

    Okay.

    Try array entering this in cell I2 and filling down.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How do I count the number of cells with negative values in a series

    This is shorter and simpler and also does not have to be array entered.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor Root_'s Avatar
    Join Date
    07-29-2017
    Location
    _
    MS-Off Ver
    2010+
    Posts
    485

    Re: How do I count the number of cells with negative values in a series

    Even shorter

    =IF(A2="","",MATCH(TRUE,INDEX(A2:H2>=0,),)-1)

  9. #9
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: How do I count the number of cells with negative values in a series

    @ Root_

    Yup. Good one.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Finding the first negative number in a series
    By tracar11 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-14-2019, 04:28 PM
  2. [SOLVED] VBA to count the number of cells between two same values
    By max333 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-01-2018, 07:03 AM
  3. Count-back "x" number of cells from when value goes negative
    By slerpen in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 10-20-2015, 12:55 PM
  4. Count number of cells with values above cell A2
    By jamesbbbbb in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-15-2013, 08:01 AM
  5. count the series of consecutive positive/negative values and sum them
    By otage in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 12-12-2012, 12:43 PM
  6. Replies: 3
    Last Post: 08-04-2011, 02:57 PM
  7. Count number of cells with values
    By rhudgins in forum Excel General
    Replies: 8
    Last Post: 05-11-2010, 10:55 AM

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