Spreadsheet: 802238d1666715949-need-help-writing-formula-to-take-6-month-average-of-data-pulling-data-using-a-code-excel-help
Sheet: Sheet1

[NAME] | Start Date Time | End Date Time | Usage | Usage Unit | Register Type | Cost | Currency Unit | Cost per unit
14349622 | 2022-07-01 00:00:00 | 2022-08-02 00:00:00 | 18 | kwh | DELIVERED | 40.28 | USD | 2.237777777777778
14349622 | 2022-06-02 00:00:00 | 2022-07-01 00:00:00 | 18 | kwh | DELIVERED | 37.79 | USD | 2.099444444444444
14349622 | 2022-05-03 00:00:00 | 2022-06-02 00:00:00 | 36 | kwh | DELIVERED | 44.41 | USD | 1.233611111111111
14349622 | 2022-04-04 00:00:00 | 2022-05-03 00:00:00 | 288 | kwh | DELIVERED | 117.64 | USD | 0.4084722222222222
8155175 | 2022-03-04 00:00:00 | 2022-04-04 00:00:00 | 0 | kwh | DELIVERED | 33.81 | USD | 33.81
8155175 | 2022-02-02 00:00:00 | 2022-03-04 00:00:00 | 0 | kwh | DELIVERED | 32.76 | USD | 32.76
8155175 | 2022-01-03 00:00:00 | 2022-02-02 00:00:00 | 0 | kwh | DELIVERED | 32.76 | USD | 32.76
8155175 | 2021-12-02 00:00:00 | 2022-01-03 00:00:00 | 0 | kwh | DELIVERED | 34.84 | USD | 34.84
8155175 | 2021-10-29 00:00:00 | 2021-12-02 00:00:00 | 0 | kwh | DELIVERED | 36.94 | USD | 36.94
8155175 | 2021-09-30 00:00:00 | 2021-10-29 00:00:00 | 0 | kwh | DELIVERED | 31.7 | USD | 31.7
8155175 | 2021-08-31 00:00:00 | 2021-09-30 00:00:00 | 0 | kwh | DELIVERED | 32.76 | USD | 32.76
8155175 | 2021-08-02 00:00:00 | 2021-08-31 00:00:00 | 0 | kwh | DELIVERED | 31.7 | USD | 31.7
8155175 | 2021-07-01 00:00:00 | 2021-08-02 00:00:00 | 0 | kwh | DELIVERED | 34.84 | USD | 34.84
8155175 | 2021-06-02 00:00:00 | 2021-07-01 00:00:00 | 0 | kwh | DELIVERED | 31.7 | USD | 31.7
8155175 | 2021-05-03 00:00:00 | 2021-06-02 00:00:00 | 0 | kwh | DELIVERED | 32.73 | USD | 32.73
8155175 | 2021-04-05 00:00:00 | 2021-05-03 00:00:00 | 0 | kwh | DELIVERED | 30.67 | USD | 30.67
8155175 | 2021-03-05 00:00:00 | 2021-04-05 00:00:00 | 18 | kwh | DELIVERED | 37.76 | USD | 2.097777777777778
8155175 | 2021-02-03 00:00:00 | 2021-03-05 00:00:00 | 0 | kwh | DELIVERED | 32.79 | USD | 32.79
8155175 | 2021-01-04 00:00:00 | 2021-02-03 00:00:00 | 0 | kwh | DELIVERED | 32.79 | USD | 32.79
8155175 | 2020-12-02 00:00:00 | 2021-01-04 00:00:00 | 18 | kwh | DELIVERED | 40.39 | USD | 2.243888888888889
8155175 | 2020-10-29 00:00:00 | 2020-12-02 00:00:00 | 36 | kwh | DELIVERED | 45.49 | USD | 1.263611111111111 |  |  |  | [NAME] | Average
8155175 | 2020-08-31 00:00:00 | 2020-10-29 00:00:00 | 72 | kwh | DELIVERED | 80.82 | USD | 1.1225
8155175 | 2020-07-31 00:00:00 | 2020-08-31 00:00:00 | 90 | kwh | DELIVERED | 56.77 | USD | 0.6307777777777778 |  |  |  | 8155175
8155175 | 2020-07-01 00:00:00 | 2020-07-31 00:00:00 | 0 | kwh | DELIVERED | 32.79 | USD | 32.79 |  |  |  | 7491408
8155175 | 2020-06-02 00:00:00 | 2020-07-01 00:00:00 | 0 | kwh | DELIVERED | 31.75 | USD | 31.75
8155175 | 2020-05-01 00:00:00 | 2020-06-02 00:00:00 | 18 | kwh | DELIVERED | 39.05 | USD | 2.169444444444444
7491408 | 2022-07-01 00:00:00 | 2022-08-02 00:00:00 | 1520 | kwh | DELIVERED | 495.44 | USD | 0.3259473684210527
7491408 | 2022-06-02 00:00:00 | 2022-07-01 00:00:00 | 1440 | kwh | DELIVERED | 517.99 | USD | 0.3597152777777778
7491408 | 2022-05-03 00:00:00 | 2022-06-02 00:00:00 | 1520 | kwh | DELIVERED | 524.88 | USD | 0.3453157894736842
7491408 | 2022-04-04 00:00:00 | 2022-05-03 00:00:00 | 1520 | kwh | DELIVERED | 485.33 | USD | 0.319296052631579
7491408 | 2022-03-04 00:00:00 | 2022-04-04 00:00:00 | 1680 | kwh | DELIVERED | 520.9 | USD | 0.3100595238095238
7491408 | 2022-02-02 00:00:00 | 2022-03-04 00:00:00 | 1680 | kwh | DELIVERED | 389.82 | USD | 0.2320357142857143
7491408 | 2022-01-03 00:00:00 | 2022-02-02 00:00:00 | 1680 | kwh | DELIVERED | 688.5 | USD | 0.4098214285714286
7491408 | 2021-12-02 00:00:00 | 2022-01-03 00:00:00 | 1840 | kwh | DELIVERED | 468.03 | USD | 0.2543641304347826
7491408 | 2021-10-29 00:00:00 | 2021-12-02 00:00:00 | 2000 | kwh | DELIVERED | 544.63 | USD | 0.272315
7491408 | 2021-09-30 00:00:00 | 2021-10-29 00:00:00 | 1760 | kwh | DELIVERED | 507.95 | USD | 0.2886079545454545
7491408 | 2021-08-31 00:00:00 | 2021-09-30 00:00:00 | 1840 | kwh | DELIVERED | 558.35 | USD | 0.3034510869565217
7491408 | 2021-08-02 00:00:00 | 2021-08-31 00:00:00 | 1840 | kwh | DELIVERED | 568.03 | USD | 0.3087119565217391
7491408 | 2021-07-01 00:00:00 | 2021-08-02 00:00:00 | 2080 | kwh | DELIVERED | 614.78 | USD | 0.2955673076923077
7491408 | 2021-06-02 00:00:00 | 2021-07-01 00:00:00 | 1920 | kwh | DELIVERED | 562.02 | USD | 0.29271875
7491408 | 2021-05-03 00:00:00 | 2021-06-02 00:00:00 | 1920 | kwh | DELIVERED | 571.41 | USD | 0.297609375
7491408 | 2021-04-05 00:00:00 | 2021-05-03 00:00:00 | 1920 | kwh | DELIVERED | 547.36 | USD | 0.2850833333333334
7491408 | 2021-03-05 00:00:00 | 2021-04-05 00:00:00 | 2000 | kwh | DELIVERED | 472.37 | USD | 0.236185
7491408 | 2021-02-03 00:00:00 | 2021-03-05 00:00:00 | 3280 | kwh | DELIVERED | 985.61 | USD | 0.3004908536585366
7491408 | 2021-01-04 00:00:00 | 2021-02-03 00:00:00 | 2240 | kwh | DELIVERED | 626.55 | USD | 0.2797098214285714
7491408 | 2020-12-02 00:00:00 | 2021-01-04 00:00:00 | 2240 | kwh | DELIVERED | 590.8 | USD | 0.26375
7491408 | 2020-10-29 00:00:00 | 2020-12-02 00:00:00 | 2160 | kwh | DELIVERED | 548.03 | USD | 0.2537175925925926
7491408 | 2020-08-31 00:00:00 | 2020-10-29 00:00:00 | 3440 | kwh | DELIVERED | 908.67 | USD | 0.2641482558139535
7491408 | 2020-07-31 00:00:00 | 2020-08-31 00:00:00 | 1840 | kwh | DELIVERED | 501.87 | USD | 0.2727554347826087
7491408 | 2020-07-01 00:00:00 | 2020-07-31 00:00:00 | 1840 | kwh | DELIVERED | 505.64 | USD | 0.2748043478260869
7491408 | 2020-06-02 00:00:00 | 2020-07-01 00:00:00 | 1920 | kwh | DELIVERED | 576.63 | USD | 0.300328125
7491408 | 2020-05-01 00:00:00 | 2020-06-02 00:00:00 | 2080 | kwh | DELIVERED | 515.17 | USD | 0.2476778846153846
7491408 | 2020-04-02 00:00:00 | 2020-05-01 00:00:00 | 2000 | kwh | DELIVERED | 452.78 | USD | 0.22639