+ Reply to Thread
Results 1 to 4 of 4

Yearly cell count of a certain value

  1. #1
    Registered User
    Join Date
    12-28-2010
    Location
    Tel-Aviv, Israel
    MS-Off Ver
    Excel 2007
    Posts
    29

    Yearly cell count of a certain value

    Hi,

    I've got a file in which i have several years of 30 minutes daily data on which I calculated the percentage change of every 30 minutes( column H) relatively to the previous day's close price (column G). If I want to count how many times a certain percentage( e.g +1% or above) change occurred in a certain year but in different days of course how would I do that?
    Attached you'll find the file.

    Thx in advance,

    Hidai
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Yearly cell count of a certain value

    Say you put the input percentage in K1

    then in say, I2 enter:

    =IF(A3=A2,"",IF(COUNTIFS(A$1:A2,A2,H$1:H2,">"&$K$1),COUNT(I$1:I1)+1,""))

    This identifies the last date record of the group where one of those dates surpassed the percentage you input into K1.

    copied down

    Then to get the count, in a separate column:

    =MAX(I:I)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    12-28-2010
    Location
    Tel-Aviv, Israel
    MS-Off Ver
    Excel 2007
    Posts
    29

    Re: Yearly cell count of a certain value

    Thx. Is there a way to program it to count how many times did it appear in a certain year?
    I need that because i have several years of data

    Thx again.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Yearly cell count of a certain value

    Assuming you have used the previous Column I helper, then say you have the input year in K2, then formula to count the unique entries per year is:

    =COUNTIFS(A:A,">="&DATE(K2,1,1),I:I,">0")-COUNTIFS(A:A,">"&DATE(K2+1,1,1),I:I,">0")

+ 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