Login Page - Create Account

Support Board


Date/Time: Fri, 22 Nov 2024 23:30:09 +0000



spreadsheet COUNTIF() across columns

View Count: 117

[2024-09-27 03:45:57]
jivetrader - Posts: 410
Spreadsheet Functions: Using the Equivalent of COUNTIF, AVERAGEIF, MAXIF, MINIF, SUMIF
The above states that COUNTIF() can be performed over a any number of cells in a column. What is the equivalent for counting across subgraphs?
I'm trying to do this: =COUNTIF(CT3:DX3,">0")
Thanks
Date Time Of Last Edit: 2024-09-27 03:47:18
[2024-09-27 13:45:50]
John - SC Support - Posts: 36238
In order to do the equivalent of COUNTIF() you need to use multiple columns and use and IF() function with a SUM() function.

For what you want, you would need to start with multiple columns to first test if the items in CT3 to DX3 are greater than 0. So you would start with the following in a cell somewhere:
=IF(CT3 > 0, 1, 0)

You would need to do this for each column, so you would need another formula that is the following:
=IF(CU3 > 0, 1, 0)

and so on.

Then you can sum the 1's by using the formula:
=SUM(MT3:NX3)

Where MT is the first column you entered the IF() statement in.

You could also do this vertically by writing each formula if a different cell going down.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account