+ Reply to Thread
Results 1 to 8 of 8

Find how many days have positive values from a list?

  1. #1
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Find how many days have positive values from a list?

    From S4:S72 i have a list of numbers that are related to a list of dates C4:C72 ,some dates are repeated. I need to find how many days have positive values?

  2. #2
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    Massachusetts
    MS-Off Ver
    365(PC) V:2308
    Posts
    1,472

    Re: Find how many days have positive values from a list?

    =countif($S$4:$S$72,">0")

  3. #3
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Find how many days have positive values from a list?

    The formula is not relating the dates C4:C72.

    Example:

    C4=10/11/2018 S4= -200
    C5=11/11/2018 S5= 500 11/11/2018 IS -100 than a negative day
    C6=11/11/2018 S6= -600
    C7=12/11/2018 S7= -50 12/11/2018 is 50 positive
    C8=12/11/2018 S8= 100
    C9=13/11/2018 S9= 100 13/11/2018 is 100 positive
    C10=14/11/2018 S10= -330
    C11=15/11/2018 S11= 200 15/11/2018 is 400 positive
    C12=15/11/2018 S12= 200

    There are 4 positive days. The formula must calculate the number of positive numbers S4:S12 related to dates C4:C12.
    Last edited by Mr.Castle; 12-06-2018 at 10:11 PM.

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Find how many days have positive values from a list?

    Try this

    =SUMPRODUCT(--(
    INDEX(($C$4:$C$12)*($S$4:$S$12>0),,)*FREQUENCY(
    INDEX(($C$4:$C$12)*($S$4:$S$12>0),,),
    INDEX(($C$4:$C$11)*($S$4:$S$11>0),,))>0))

    Note: last reference in this formula is $S$11 (one less, not a mistake)

  5. #5
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Find how many days have positive values from a list?

    Hi , the formula is counting 0 as positive in S4:S12.

    Example:

    C9=11/10/2018 S9=-4,0
    C10=11/10/2018 S10=0

    And is counted as positive

  6. #6
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Find how many days have positive values from a list?

    I notice other problem.

    Example:

    C9 = 10/10/2018 S9=44
    C10=10/10/2018 S10=-90

    Is counting as a positive value when a greater negative number comes in second, but if was the inverse s9=-90 and s10=44 it would count correctly as negative. So the formula must add and subtract from any related S number from the same dates C, and find wether the result is positive, like the example above. Finally it must count all positive values.
    Last edited by Mr.Castle; 12-08-2018 at 04:28 PM.

  7. #7
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Find how many days have positive values from a list?

    Hi MrCastle

    I do not understand why the formula gives you 0 (for me is 4). The formula gives you the number of days that has at least a positive value

    The new formula gives you the number of days with a positive aggregate sum (3) and use a helper column T

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Where column T has the following formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    See the file for clarification
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    07-09-2018
    Location
    Germany
    MS-Off Ver
    2016
    Posts
    257

    Re: Find how many days have positive values from a list?

    The new formula worked ,

    Thank you José Augusto

+ 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. Consolidate list of only cells with positive values
    By seanppp in forum Excel General
    Replies: 3
    Last Post: 03-27-2018, 02:46 PM
  2. [SOLVED] Find Top5 Positive and Negative values fromtwo columns
    By Parth007 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-07-2016, 01:37 AM
  3. [SOLVED] Find pattern (positive, negative, positive)
    By tsakta13ole in forum Excel General
    Replies: 6
    Last Post: 06-01-2016, 05:10 AM
  4. Replies: 3
    Last Post: 11-17-2014, 11:09 AM
  5. Find negatives and reciprocal positive values to flag
    By phil3061 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-30-2013, 04:00 PM
  6. Replies: 4
    Last Post: 06-14-2012, 06:53 AM
  7. Find where values change from positive to negative
    By jevans30253 in forum Excel General
    Replies: 2
    Last Post: 09-28-2010, 10:06 PM

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