Support Board
Date/Time: Sun, 24 Nov 2024 13:45:50 +0000
[Programming Help] - Permanent/ Static Counter on Spreadsheet
View Count: 250
[2024-05-22 16:39:47] |
alexo2022 - Posts: 47 |
I want to create counter on spreadsheet column that counts every time the other column contains the value "2" for example I use column P and Q. IF(Q3=2,COUNT(1),0). My goal is to count how many times column Q had the value "2". For example first time - Q3=2 -> Count 1 - P3=1 second time - Q3=2 -> Count 1 - P3=2 third time - Q3=2 -> Count 1 - P3=3 etc And I always want the see the last count on column P, in this example P3=3. the issue is that it works as long as the values are in the 1000 rows range, when they disappear all the counting is being reset. how can I resolve this issue ? Date Time Of Last Edit: 2024-05-22 16:41:15
|
[2024-05-23 13:07:22] |
Sawtooth - Posts: 4118 |
how can I resolve this issue ?
Try this:=IF(Q3=2,P4+1,P4) |
[2024-05-23 13:40:44] |
alexo2022 - Posts: 47 |
Try this:
=IF(Q3=2,P4+1,P4) It works as long as Q3=2, as soon as Q3=0 then it resets the counting. My goal is to have unique counts even when the data is no longer available in the spreadsheet. the color bar study, has counter that works like this. as a metaphor, I want to have a counter that tell me how many 3 points were in a quarter, in a basketball game, even though the quarter was already ended. |
[2024-05-23 13:50:38] |
Sawtooth - Posts: 4118 |
as soon as Q3=0 then it resets the counting.
That's not what I'm seeing.Try this: Put this in e.g. S3: =IF(S4=10,0,S4+1) This will count from 0 to 10, and repeat. P3: =IF(S3=2,P4+1,P4) This will increment the count by 1 each time there is a 2 in column S, and make it persistent until the next 2. |
[2024-05-24 06:14:26] |
alexo2022 - Posts: 47 |
Try this: Put this in e.g. S3: =IF(S4=10,0,S4+1) This will count from 0 to 10, and repeat. P3: =IF(S3=2,P4+1,P4) This will increment the count by 1 each time there is a 2 in column S, and make it persistent until the next 2. it works as long as the numbers are in the spreadsheet, there are 1000 rows in my spreadsheet, once the number "2" is getting out of the spreadsheet, the counter resets. I need counter in other cell that has "memory", that can save the counting even though the numbers are no longer there. For example first time - Q3=2 -> Count 1 second time - Q3=2 -> Count 2 third time - Q3=2 -> Count 3 etc |
[2024-05-24 12:21:50] |
Sawtooth - Posts: 4118 |
I need counter in other cell that has "memory", that can save the counting even though
It's generally not possible to 'save' a value that occurred prior to existing spreadsheet rows.the numbers are no longer there. A cell in row 1003 can reference another cell within the 1000 Number of Rows setting, if that could be utilized in your setup. You can lock a cell TRUE, if that could be utilized in your setup. https://www.sawtoothtrade.com/example-9.html Date Time Of Last Edit: 2024-05-24 16:50:23
|
[2024-05-29 14:36:59] |
alexo2022 - Posts: 47 |
I managed to do it with "Cumulative Sum of Study"
Date Time Of Last Edit: 2024-05-29 14:37:13
|
To post a message in this thread, you need to log in with your Sierra Chart account: