Login Page - Create Account

Support Board


Date/Time: Tue, 07 May 2024 06:13:39 +0000



[User Discussion] - spreadsheet countif alternative

View Count: 1862

[2017-01-07 20:06:09]
BearDown - Posts: 2
I need to find a way to count the number of occurrences of a specific value in a range. I tried your alternative

"The formula =COUNTIF(AA3:AA12,">50") can be implemented in the non-CLR version as follows: In one of the spreadsheet formula columns enter this formula =IF(AA3>50,1,0). Assuming the prior formula was entered in formula column X, then enter =SUM(X3:X12) in another formula column. The result of this last formula will be the same as =COUNTIF(AA3:AA12,">50")."

However, this does not apply to me because you are using the =SUM function. I also tried without using the 'SUM' so it was just =(X3:X12) and that didn't work either.

I want to do the following which is basically searching a range A1:A5.

A1 = 2000
A2 = 2001
A3 = 2000
A4 = 2000
A5 = 2001

=COUNTIF(A1:A5, 2000)

This would return 3 because there are 3 occurrences of 2000.

Please Please Please help...
[2017-01-09 20:23:28]
Sierra Chart Engineering - Posts: 104368
For the first formula you will need to use:
=IF(AA3=2000,1,0)

The second formula needs to be:
=SUM(X3:X7)
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2017-01-14 16:31:39]
BearDown - Posts: 2
That makes no sense... Let try to explain it again using the actual cells.

Assuming this formula is in cell C1, this is what I want to accomplish in cell C1.

=COUNTIF(C4:C23,C3)
Date Time Of Last Edit: 2017-01-14 16:35:03
[2017-01-14 20:39:02]
Sierra Chart Engineering - Posts: 104368
If you would like formula programming help, that is available for an additional cost at 35 USD per hour.

If you would like that, we will arrange for someone to help you. You will also need to add some credit to your Services Balance.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2017-01-14 20:44:25
[2017-01-14 21:02:51]
Sawtooth - Posts: 3993
You only need an extra column, e.g. column D:

Cell D4:
=IF(C4=C$3,1,0)
propagate above formula from D4 to D23
Cell C1:
=SUM(D4:D23)

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account