jdavis51198
New Member
- Joined
- Nov 4, 2022
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
Hi, I am trying to do a few things based on the below sheet. Essentially I have a long sheet of dates broken down by year ,month ,day hour...etc. I aim to have a rolling count of the total number of rows for each year. So column "percentcounter is an example of what I would expect to see. It will count right up until 2026, and then it will reset back to one until the first occurrence of 2027 happens. What would be the best way to go about this, I have tried using a count statement like such =IF(B3=2025,COUNT($G$2:G3), but I am not sure how to tell it to "reset" at the first occurrence of the change in a year.
SensitivityAnalysis v7.xlsx | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | |||
1 | * MISO 2021 Q3 | IFERRO(AVERAGEIFS(hourlyprices,asOfDate,A3,HE,C3),0) | * SNL Forward LMP MISO 2022 Q3.csv | ||||||||||
2 | sim.asOfDate | sim.ContractYear | sim.HE | sim.FOM | TimeOfUse | generation | F(0,T) | floor | newFloor | percentCounter | percentageStrike | ||
3 | 12/31/2025 | 2025 | 1 | 12/1/2025 | OffPeak | 0 | 42.05 | 0 | -22 | 1 | 3% | ||
4 | 12/31/2025 | 2025 | 2 | 12/1/2025 | OffPeak | 0 | 41.01 | 0 | -22 | 2 | 3% | ||
5 | 12/31/2025 | 2025 | 3 | 12/1/2025 | OffPeak | 0 | 40.89 | 0 | -22 | 3 | 3% | ||
6 | 12/31/2025 | 2025 | 4 | 12/1/2025 | OffPeak | 0 | 41.01 | 0 | -22 | 4 | 3% | ||
7 | 12/31/2025 | 2025 | 5 | 12/1/2025 | OffPeak | 0 | 41.13 | 0 | -22 | 5 | 3% | ||
8 | 12/31/2025 | 2025 | 6 | 12/1/2025 | OffPeak | 0 | 43.62 | 0 | -22 | 6 | 3% | ||
9 | 12/31/2025 | 2025 | 7 | 12/1/2025 | Peak | 0 | 53.14 | 0 | -22 | 7 | 3% | ||
10 | 12/31/2025 | 2025 | 8 | 12/1/2025 | Peak | 0 | 55.92 | 0 | -22 | 8 | 3% | ||
11 | 12/31/2025 | 2025 | 9 | 12/1/2025 | Peak | 1 | 53.96 | 0 | -22 | 9 | 3% | ||
12 | 12/31/2025 | 2025 | 10 | 12/1/2025 | Peak | 6 | 51.93 | 0 | -22 | 10 | 3% | ||
13 | 12/31/2025 | 2025 | 11 | 12/1/2025 | Peak | 12 | 51.78 | 0 | -22 | 11 | 3% | ||
14 | 12/31/2025 | 2025 | 12 | 12/1/2025 | Peak | 13 | 48.64 | 0 | -22 | 12 | 3% | ||
15 | 12/31/2025 | 2025 | 13 | 12/1/2025 | Peak | 11 | 47.08 | 0 | -22 | 13 | 3% | ||
16 | 12/31/2025 | 2025 | 14 | 12/1/2025 | Peak | 9 | 46.87 | 0 | -22 | 14 | 3% | ||
17 | 12/31/2025 | 2025 | 15 | 12/1/2025 | Peak | 7 | 43.83 | 0 | -22 | 15 | 3% | ||
18 | 12/31/2025 | 2025 | 16 | 12/1/2025 | Peak | 6 | 43.19 | 0 | -22 | 16 | 3% | ||
19 | 12/31/2025 | 2025 | 17 | 12/1/2025 | Peak | 0 | 44.85 | 0 | -22 | 17 | 3% | ||
20 | 12/31/2025 | 2025 | 18 | 12/1/2025 | Peak | 0 | 62.26 | 0 | -22 | 18 | 3% | ||
21 | 12/31/2025 | 2025 | 19 | 12/1/2025 | Peak | 0 | 58.06 | 0 | -22 | 19 | 3% | ||
22 | 12/31/2025 | 2025 | 20 | 12/1/2025 | Peak | 0 | 58.35 | 0 | -22 | 20 | 3% | ||
23 | 12/31/2025 | 2025 | 21 | 12/1/2025 | Peak | 0 | 57.08 | 0 | -22 | 21 | 3% | ||
24 | 12/31/2025 | 2025 | 22 | 12/1/2025 | Peak | 0 | 53.36 | 0 | -22 | 22 | 3% | ||
25 | 12/31/2025 | 2025 | 23 | 12/1/2025 | OffPeak | 0 | 42.88 | 0 | -22 | 23 | 3% | ||
26 | 12/31/2025 | 2025 | 24 | 12/1/2025 | OffPeak | 0 | 40.73 | 0 | -22 | 24 | 3% | ||
27 | 1/1/2026 | 2026 | 1 | 1/1/2026 | OffPeak | 0 | 44.02 | 0 | -22 | 1 | 3% | ||
28 | 1/1/2026 | 2026 | 2 | 1/1/2026 | OffPeak | 0 | 39.48 | 0 | -22 | 2 | 3% | ||
29 | 1/1/2026 | 2026 | 3 | 1/1/2026 | OffPeak | 0 | 37.23 | 0 | -22 | 3 | 3% | ||
30 | 1/1/2026 | 2026 | 4 | 1/1/2026 | OffPeak | 0 | 37.26 | 0 | -22 | 4 | 3% | ||
31 | 1/1/2026 | 2026 | 5 | 1/1/2026 | OffPeak | 0 | 39.08 | 0 | -22 | 5 | 3% | ||
32 | 1/1/2026 | 2026 | 6 | 1/1/2026 | OffPeak | 0 | 40.00 | 0 | -22 | 6 | 3% | ||
33 | 1/1/2026 | 2026 | 7 | 1/1/2026 | OffPeak | 0 | 45.26 | 0 | -22 | 7 | 3% | ||
34 | 1/1/2026 | 2026 | 8 | 1/1/2026 | OffPeak | 2 | 52.31 | 0 | -22 | 8 | 3% | ||
35 | 1/1/2026 | 2026 | 9 | 1/1/2026 | OffPeak | 5 | 53.58 | 0 | -22 | 9 | 3% | ||
VWHSP (Hour) |
Cell Formulas | ||
---|---|---|
Range | Formula | |
J3:J26 | J3 | =IF(B3=2025,COUNT($G$2:G3),COUNTIF($G$2:G3,"=2026")) |
J27:J35 | J27 | =IF(B27=2026,COUNT($G$26:G26)) |