Support Board
Date/Time: Thu, 08 May 2025 20:14:33 +0000
Post From: Programming Help - SpreadSheets Loop Count
[2024-11-03 22:50:03] |
User224654 - Posts: 23 |
Try this in cell P3: =MOD(ROW() - 3, 50) + 1 Explanation: ROW() returns the current row number. ROW() - 3 adjusts the row number, as Sierra Chart data typically starts from row 3. MOD(..., 50) calculates the remainder of division by 50, resulting in values between 0 and 49. Adding 1 shifts the range to 1 through 50. This formula will count from 1 to 50 and automatically reset after each 50-bar cycle. Note: In Sierra Chart, formulas are usually entered in row 3 and applied automatically to rows below. Make sure the formula is in the correct starting row for the desired effect. |