Spreadsheet: 719004d1613468682-something-is-wrong-in-this-index-calculation-how-to-correct-this-index-and-sumifs
Sheet: orig

 | TIME | BOUGHT/SOLD    0.01=1000 | PRICE DIFF | Total traded quantity 0.01=1000 | PRICE |  |  | OA= OverAll START TIME = b3 |  |  | TIME 1= A | TIME 2=AT |  |  | LTP= LAST TRADED TIME
 |  |  |  |  |  |  | OA=
1 | 2021-02-15 11:47:28.090000 | -0.001000000000001222 | 0 | 29.42277 | 86.25
2 | 2021-02-15 11:47:38.100000 | -0.0003700000000002035 | 0 | 29.42314 | 86.25 |  |  | Last price=
3 | 2021-02-15 11:47:40.280000 | 0.004999999999999005 | 0.04999999999999716 | 29.42814 | 86.3 |  |  | RANGE>>> |  | OA= I2 to P2 |  |  | A=L2 to P2 |  | AT= M2 to P2
4 | 2021-02-15 11:47:42.270000 | 0.004100000000001103 | 0 | 29.43224 | 86.3 |  |  |  |  | BOUGHT | SOLD |  | BOUGHT | SOLD | BOUGHT | SOLD
5 | 2021-02-15 11:47:48.270000 | 9.999999999621423e-06 | 0 | 29.43225 | 86.3 |  |  | 10 |  |  |  | 96
6 | 2021-02-15 11:47:54.490000 | -0.0008400000000001739 | -0.04999999999999716 | 29.43309 | 86.25 |  |  | 9 |  |  |  | 95
7 | 2021-02-15 11:47:58.280000 | -1.999999999924285e-05 | 0 | 29.43311 | 86.25 |  |  | 8 |  |  |  | 94
8 | 2021-02-15 11:48:02.290000 | 0.001580000000000581 | 0.04999999999999716 | 29.43469 | 86.3 |  |  | 7 |  |  |  | 93
9 | 2021-02-15 11:48:04.280000 | -1.999999999924285e-05 | -0.04999999999999716 | 29.43471 | 86.25 |  |  | 6 |  |  |  | 92
10 | 2021-02-15 11:48:06.270000 | 0.0007000000000019213 | 0.04999999999999716 | 29.43541 | 86.3 |  |  | 5 |  |  |  | 91
11 | 2021-02-15 11:48:12.270000 | 9.999999999976694e-05 | 0 | 29.43551 | 86.3 |  |  | 4 |  |  |  | 90
12 | 2021-02-15 11:48:14.290000 | 7.000000000090267e-05 | 0 | 29.43558 | 86.3 |  |  | 3 |  |  |  | 89
13 | 2021-02-15 11:48:18.270000 | 0.0002999999999993008 | 0 | 29.43588 | 86.3 |  |  | 2 |  |  |  | 88
14 | 2021-02-15 11:48:20.300000 | 9.999999999621423e-06 | 0 | 29.43589 | 86.3 |  |  | 1 |  |  |  | 87
15 | 2021-02-15 11:48:24.490000 | 0.0004999999999988347 | 0 | 29.43639 | 86.3 |  |  | LTP |  |  |  | 86
16 | 2021-02-15 11:48:30.270000 | 0.001740000000001629 | 0 | 29.43813 | 86.3 |  |  | 1 |  |  |  | 85
17 | 2021-02-15 11:48:32.280000 | 9.999999999976694e-05 | 0 | 29.43823 | 86.3 |  |  | 2 |  |  |  | 84
18 | 2021-02-15 11:48:42.270000 | 0.0009999999999976694 | 0 | 29.43923 | 86.3 |  |  | 3 |  |  |  | 83
19 | 2021-02-15 11:48:50.280000 | 5.000000000165983e-05 | 0 | 29.43928 | 86.3 |  |  | 4 |  |  |  | 82
20 | 2021-02-15 11:48:58.300000 | 0.001259999999998485 | 0 | 29.44054 | 86.3 |  |  | 5 |  |  |  | 81
21 | 2021-02-15 11:49:00.270000 | 0.005000000000002558 | 0 | 29.44554 | 86.3 |  |  | 6 |  |  |  | 80
22 | 2021-02-15 11:49:06.280000 | 0.01999999999999957 | 0 | 29.46554 | 86.3 |  |  | 7 |  |  |  | 79
23 | 2021-02-15 11:49:08.290000 | 0.0002299999999983982 | 0 | 29.46577 | 86.3 |  |  | 8 |  |  |  | 78
24 | 2021-02-15 11:49:16.280000 | -9.999999999621423e-06 | -0.04999999999999716 | 29.46578 | 86.25 |  |  | 9 |  |  |  | 77
25 | 2021-02-15 11:49:18.270000 | -0.01161000000000101 | 0 | 29.47739 | 86.25 |  |  | 10 |  |  |  | 76
26 | 2021-02-15 11:49:22.290000 | -0.006060000000001509 | 0 | 29.48345 | 86.25
27 | 2021-02-15 11:49:30.270000 | 0.01999999999999957 | 0.04999999999999716 | 29.50345 | 86.3
28 | 2021-02-15 11:49:34.290000 | 0.001999999999998892 | 0 | 29.50545 | 86.3 | The formula in Column K and L give precise value but I don’t know how to get the values for A an AT index till LTP index like in column NOPQ
29 | 2021-02-15 11:49:36.270000 | 9.999999999976694e-05 | 0 | 29.50555 | 86.3 | Can we modify the formula in Col K to get the value in Col N for the Bought shares between Index A and Index LTP and so on in Col O( sold)
30 | 2021-02-15 11:49:42.290000 | -0.001000000000001222 | -0.04999999999999716 | 29.50655 | 86.25 | Similarly for AT and LTP in Col P and Q
31 | 2021-02-15 11:49:46.290000 | 2.999999999886427e-05 | 0.04999999999999716 | 29.50658 | 86.3
32 | 2021-02-15 11:49:48.310000 | 5.000000000165983e-05 | 0 | 29.50663 | 86.3
33 | 2021-02-15 11:49:56.520000 | -2.999999999886427e-05 | -0.04999999999999716 | 29.50666 | 86.25
34 | 2021-02-15 11:50:00.300000 | 0.0003500000000009607 | 0.04999999999999716 | 29.50701 | 86.3
35 | 2021-02-15 11:50:02.310000 | 0.0009999999999976694 | 0 | 29.50801 | 86.3
36 | 2021-02-15 11:50:10.300000 | 0.0005000000000023874 | 0 | 29.50851 | 86.3
37 | 2021-02-15 11:50:14.310000 | -4.999999999810711e-05 | -0.04999999999999716 | 29.50856 | 86.25
38 | 2021-02-15 11:50:18.310000 | 0.001000000000001222 | 0.04999999999999716 | 29.50956 | 86.3
39 | 2021-02-15 11:50:20.310000 | 7.000000000090267e-05 | 0 | 29.50963 | 86.3
40 | 2021-02-15 11:50:30.320000 | 0.0009999999999976694 | 0 | 29.51063 | 86.3
41 | 2021-02-15 11:50:38.340000 | 1.999999999924285e-05 | 0 | 29.51065 | 86.3
42 | 2021-02-15 11:50:40.320000 | -0.0002600000000008151 | -0.04999999999999716 | 29.51091 | 86.25
43 | 2021-02-15 11:50:42.340000 | 0.003009999999999735 | 0.04999999999999716 | 29.51392 | 86.3
44 | 2021-02-15 11:50:52.350000 | -0.04265000000000185 | -0.09999999999999432 | 29.55657 | 86.2
45 | 2021-02-15 11:50:54.320000 | -0.0009999999999976694 | 0 | 29.55757 | 86.2
46 | 2021-02-15 11:50:58.320000 | -0.0103400000000029 | 0 | 29.56791 | 86.2
47 | 2021-02-15 11:51:02.350000 | 0.004999999999999005 | 0.04999999999999716 | 29.57291 | 86.25
48 | 2021-02-15 11:51:04.350000 | 0.004999999999999005 | 0 | 29.57791 | 86.25
49 | 2021-02-15 11:51:06.320000 | 0.0008100000000013097 | 0 | 29.57872 | 86.25
50 | 2021-02-15 11:51:08.320000 | 9.999999999621423e-06 | 0 | 29.57873 | 86.25
51 | 2021-02-15 11:51:10.350000 | 0.004999999999999005 | 0 | 29.58373 | 86.25
52 | 2021-02-15 11:51:14.330000 | 0.00619000000000014 | 0 | 29.58992 | 86.25
53 | 2021-02-15 11:51:18.340000 | -0.005200000000002092 | -0.09999999999999432 | 29.59512 | 86.15
54 | 2021-02-15 11:51:20.330000 | -0.0009999999999976694 | 0 | 29.59612 | 86.15
55 | 2021-02-15 11:51:26.570000 | 0.00590000000000046 | 0.09999999999999432 | 29.60202 | 86.25
56 | 2021-02-15 11:51:30.320000 | 1.999999999924285e-05 | 0 | 29.60204 | 86.25
57 | 2021-02-15 11:51:32.340000 | 0.0005000000000023874 | 0 | 29.60254 | 86.25
58 | 2021-02-15 11:51:42.340000 | 1.999999999924285e-05 | 0 | 29.60256 | 86.25
59 | 2021-02-15 11:51:44.340000 | 0.001999999999998892 | 0 | 29.60456 | 86.25
60 | 2021-02-15 11:51:48.340000 | 0.0005000000000023874 | 0 | 29.60506 | 86.25
61 | 2021-02-15 11:51:50.360000 | -0.001239999999999242 | -0.04999999999999716 | 29.6063 | 86.2
62 | 2021-02-15 11:51:56.340000 | 0.0004999999999988347 | 0.04999999999999716 | 29.6068 | 86.25
63 | 2021-02-15 11:51:58.560000 | 1.999999999924285e-05 | 0 | 29.60682 | 86.25
64 | 2021-02-15 11:52:00.370000 | -0.005500000000001393 | -0.09999999999999432 | 29.61232 | 86.15
65 | 2021-02-15 11:52:06.350000 | -0.0002999999999993008 | -0.1000000000000085 | 29.61262 | 86.05
66 | 2021-02-15 11:52:08.340000 | 0.1173000000000002 | 0.1000000000000085 | 29.72992 | 86.15
67 | 2021-02-15 11:52:10.340000 | 0.002250000000000085 | 0 | 29.73217 | 86.15
68 | 2021-02-15 11:52:12.340000 | 6.000000000128125e-05 | 0 | 29.73223 | 86.15
69 | 2021-02-15 11:52:14.350000 | -0.01885000000000048 | -0.1500000000000057 | 29.75108 | 86
70 | 2021-02-15 11:52:16.350000 | 0.0006799999999991257 | 0.2000000000000028 | 29.75176 | 86.2
71 | 2021-02-15 11:52:28.560000 | -0.001999999999998892 | -0.1500000000000057 | 29.75376 | 86.05
72 | 2021-02-15 11:52:30.340000 | -0.004000000000001336 | 0 | 29.75776 | 86.05
73 | 2021-02-15 11:52:38.350000 | -0.0005899999999989802 | 0 | 29.75835 | 86.05
74 | 2021-02-15 11:52:40.340000 | 9.999999999621423e-06 | 0.1000000000000085 | 29.75836 | 86.15
75 | 2021-02-15 11:52:52.340000 | -0.001000000000001222 | -0.1000000000000085 | 29.75936 | 86.05
76 | 2021-02-15 11:52:56.330000 | 0.05000000000000071 | 0.2000000000000028 | 29.80936 | 86.25
77 | 2021-02-15 11:53:00.390000 | -0.002009999999998513 | -0.04999999999999716 | 29.81137 | 86.2
78 | 2021-02-15 11:53:02.400000 | -0.008150000000000546 | -0.1500000000000057 | 29.81952 | 86.05
79 | 2021-02-15 11:53:08.380000 | 0.004999999999999005 | 0.1500000000000057 | 29.82452 | 86.2
80 | 2021-02-15 11:53:10.410000 | 0.004999999999999005 | 0 | 29.82952 | 86.2
81 | 2021-02-15 11:53:12.410000 | 0.0005000000000023874 | 0 | 29.83002 | 86.2
82 | 2021-02-15 11:53:14.380000 | -0.001999999999998892 | -0.1000000000000085 | 29.83202 | 86.1
83 | 2021-02-15 11:53:18.390000 | -0.001020000000000465 | 0 | 29.83304 | 86.1
84 | 2021-02-15 11:53:22.400000 | -9.000000000014552e-05 | 0 | 29.83313 | 86.1
85 | 2021-02-15 11:53:24.430000 | 0.0007999999999981355 | 0.1000000000000085 | 29.83393 | 86.2
86 | 2021-02-15 11:53:26.380000 | 0.005000000000002558 | 0 | 29.83893 | 86.2
87 | 2021-02-15 11:53:28.600000 | -0.0009999999999976694 | -0.1000000000000085 | 29.83993 | 86.1
88 | 2021-02-15 11:53:30.410000 | -0.001000000000001222 | 0 | 29.84093 | 86.1
89 | 2021-02-15 11:53:32.390000 | 0.001500000000000057 | 0.1000000000000085 | 29.84243 | 86.2
90 | 2021-02-15 11:53:34.380000 | 0.003199999999999648 | 0 | 29.84563 | 86.2
91 | 2021-02-15 11:53:48.410000 | 0.01125000000000043 | 0 | 29.85688 | 86.2
92 | 2021-02-15 11:54:04.650000 | -0.004999999999999005 | -0.04999999999999716 | 29.86188 | 86.15
93 | 2021-02-15 11:54:08.670000 | -0.004999999999999005 | -0.1000000000000085 | 29.86688 | 86.05
94 | 2021-02-15 11:54:10.680000 | -0.01620000000000132 | 0 | 29.88308 | 86.05
95 | 2021-02-15 11:54:14.650000 | -0.01000000000000156 | 0 | 29.89308 | 86.05
96 | 2021-02-15 11:54:28.660000 | -0.006799999999998363 | 0 | 29.89988 | 86.05
97 | 2021-02-15 11:54:34.650000 | -0.001200000000000756 | 0 | 29.90108 | 86.05
98 | 2021-02-15 11:54:38.680000 | -0.0007300000000007856 | 0 | 29.90181 | 86.05
99 | 2021-02-15 11:54:42.650000 | -0.0001999999999995339 | -0.04999999999999716 | 29.90201 | 86