Spreadsheet: 851115d1701355680-formula-to-identify-newest-balanced-period-not-working-paladar-balanced-accounts
Sheet: Sheet1

Period Name | Account | Movement |  | Required result
2017-04-01 00:00:00 | 10000 | 437701 |  | 2017-12-01 00:00:00
2017-04-01 00:00:00 | 10000 | -218857.31 |  | 2017-12-01 00:00:00
2018-04-01 00:00:00 | 10000 | 900482
2018-04-01 00:00:00 | 10000 | -450241
2018-04-01 00:00:00 | 10000 | -225120.5
2021-04-01 00:00:00 | 20000 | -63504.25 |  | 2023-06-01 00:00:00
2021-04-01 00:00:00 | 30000 | -73717.5 |  | 2023-06-01 00:00:00
2021-04-01 00:00:00 | 20000 | 19051.29 |  | 2023-06-01 00:00:00
2021-04-01 00:00:00 | 30000 | 22114.74 |  | 2023-06-01 00:00:00
2022-04-01 00:00:00 | 20000 | 117556 |  | 2023-06-01 00:00:00
2022-04-01 00:00:00 | 20000 | -58731.19 |  | 2023-06-01 00:00:00
2022-04-01 00:00:00 | 30000 | 119030 |  | 2023-06-01 00:00:00
2022-04-01 00:00:00 | 30000 | -59235.82 |  | 2023-06-01 00:00:00
2017-08-01 00:00:00 | 10000 | 462781 |  | 2017-12-01 00:00:00
2017-08-01 00:00:00 | 10000 | -231397.68 |  | 2017-12-01 00:00:00
2018-08-01 00:00:00 | 10000 | 470343
2018-08-01 00:00:00 | 10000 | -235178.29
2022-08-01 00:00:00 | 20000 | 1711.74 |  | 2023-06-01 00:00:00
2022-08-01 00:00:00 | 30000 | 26072.54 |  | 2023-06-01 00:00:00
2022-08-01 00:00:00 | 20000 | -1711.74 |  | 2023-06-01 00:00:00
2022-08-01 00:00:00 | 30000 | -26072.54 |  | 2023-06-01 00:00:00
2017-12-01 00:00:00 | 10000 | -231388.11 |  | 2017-12-01 00:00:00
2018-12-01 00:00:00 | 10000 | -235171.49
2021-12-01 00:00:00 | 20000 | -61820.16 |  | 2023-06-01 00:00:00
2021-12-01 00:00:00 | 30000 | -71762.4 |  | 2023-06-01 00:00:00
2017-07-01 00:00:00 | 10000 | 462781 |  | 2017-12-01 00:00:00
2017-07-01 00:00:00 | 10000 | -231397.68 |  | 2017-12-01 00:00:00
2018-07-01 00:00:00 | 10000 | -235178.29
2018-07-01 00:00:00 | 10000 | 470343
2015-06-01 00:00:00 | 10000 | 26232 |  | 2017-12-01 00:00:00
2015-06-01 00:00:00 | 10000 | 26232 |  | 2017-12-01 00:00:00
2015-06-01 00:00:00 | 10000 | 26232.63 |  | 2017-12-01 00:00:00
2015-06-01 00:00:00 | 10000 | -78696.63 |  | 2017-12-01 00:00:00
2017-06-01 00:00:00 | 10000 | 462795.35 |  | 2017-12-01 00:00:00
2017-06-01 00:00:00 | 10000 | -218850.5 |  | 2017-12-01 00:00:00
2018-06-01 00:00:00 | 10000 | 470356.57
2018-06-01 00:00:00 | 10000 | -225120.5
2021-06-01 00:00:00 | 20000 | 12701.36 |  | 2023-06-01 00:00:00
2021-06-01 00:00:00 | 20000 | -69854.68 |  | 2023-06-01 00:00:00
2021-06-01 00:00:00 | 30000 | 14744.16 |  | 2023-06-01 00:00:00
2021-06-01 00:00:00 | 30000 | -81089.08 |  | 2023-06-01 00:00:00
2022-06-01 00:00:00 | 20000 | -3182.58 |  | 2023-06-01 00:00:00
2022-06-01 00:00:00 | 20000 | -58731.19 |  | 2023-06-01 00:00:00
2022-06-01 00:00:00 | 30000 | -13084.94 |  | 2023-06-01 00:00:00
2022-06-01 00:00:00 | 30000 | -59235.82 |  | 2023-06-01 00:00:00
2017-03-01 00:00:00 | 10000 | 218857.31 |  | 2017-12-01 00:00:00
2018-03-01 00:00:00 | 10000 | 450241
2018-03-01 00:00:00 | 10000 | -225120.5
2021-03-01 00:00:00 | 20000 | 44452.96 |  | 2023-06-01 00:00:00
2021-03-01 00:00:00 | 30000 | 51602.76 |  | 2023-06-01 00:00:00
2022-03-01 00:00:00 | 30000 | 71762.4 |  | 2023-06-01 00:00:00
2022-03-01 00:00:00 | 20000 | 61820.15 |  | 2023-06-01 00:00:00
2017-05-01 00:00:00 | 10000 | -218850.5 |  | 2017-12-01 00:00:00
2018-05-01 00:00:00 | 10000 | -225120.5
2021-05-01 00:00:00 | 30000 | 66344.92 |  | 2023-06-01 00:00:00
2021-05-01 00:00:00 | 20000 | 57153.32 |  | 2023-06-01 00:00:00
2022-05-01 00:00:00 | 30000 | -59235.82 |  | 2023-06-01 00:00:00
2022-05-01 00:00:00 | 20000 | -58731.19 |  | 2023-06-01 00:00:00
2017-12-01 00:00:00 | 10000 | -231388.1 |  | 2017-12-01 00:00:00
2018-11-01 00:00:00 | 10000 | -235171.5
2018-11-01 00:00:00 | 10000 | -235171.5
2018-11-01 00:00:00 | 10000 | 235171.5
2021-11-01 00:00:00 | 30000 | 3910.8 |  | 2023-06-01 00:00:00
2021-11-01 00:00:00 | 30000 | 67851.6 |  | 2023-06-01 00:00:00
2021-11-01 00:00:00 | 20000 | 61820.16 |  | 2023-06-01 00:00:00
2017-10-01 00:00:00 | 10000 | -231388.1 |  | 2017-12-01 00:00:00
2018-10-01 00:00:00 | 10000 | -470343
2017-09-01 00:00:00 | 10000 | -231397.68 |  | 2017-12-01 00:00:00
2018-09-01 00:00:00 | 10000 | -235178.29
2023-03-01 00:00:00 | 20000 | 47865.22 |  | 2023-06-01 00:00:00
2023-03-01 00:00:00 | 30000 | 59107.81 |  | 2023-06-01 00:00:00
2023-04-01 00:00:00 | 20000 | -64364.26 |  | 2023-06-01 00:00:00
2023-04-01 00:00:00 | 20000 | 120479 |  | 2023-06-01 00:00:00
2023-04-01 00:00:00 | 30000 | -59622.73 |  | 2023-06-01 00:00:00
2023-04-01 00:00:00 | 30000 | 118987 |  | 2023-06-01 00:00:00
2023-05-01 00:00:00 | 20000 | -64364.26 |  | 2023-06-01 00:00:00
2023-05-01 00:00:00 | 30000 | -59622.73 |  | 2023-06-01 00:00:00
2023-06-01 00:00:00 | 20000 | 24748.57 |  | 2023-06-01 00:00:00
2023-06-01 00:00:00 | 20000 | -0.01 |  | 2023-06-01 00:00:00
2023-06-01 00:00:00 | 20000 | -64364.26 |  | 2023-06-01 00:00:00
2023-06-01 00:00:00 | 30000 | -59622.73 |  | 2023-06-01 00:00:00
2023-06-01 00:00:00 | 30000 | 773.39 |  | 2023-06-01 00:00:00
2023-06-01 00:00:00 | 30000 | -0.01 |  | 2023-06-01 00:00:00
2022-09-01 00:00:00 | 20000 | 59976.72 |  | 2023-06-01 00:00:00
2023-09-01 00:00:00 | 20000 | 68376.68
2023-09-01 00:00:00 | 30000 | 75419.65
2022-09-01 00:00:00 | 30000 | 34851.58 |  | 2023-06-01 00:00:00
2022-10-01 00:00:00 | 20000 | 61688.46 |  | 2023-06-01 00:00:00
2022-10-01 00:00:00 | 30000 | 60924.12 |  | 2023-06-01 00:00:00
2022-11-01 00:00:00 | 20000 | -59847.64 |  | 2023-06-01 00:00:00
2022-11-01 00:00:00 | 30000 | -59473.02 |  | 2023-06-01 00:00:00
2022-12-01 00:00:00 | 20000 | -59847.64 |  | 2023-06-01 00:00:00
2022-12-01 00:00:00 | 20000 | -1969.9 |  | 2023-06-01 00:00:00
2022-12-01 00:00:00 | 30000 | -59473.02 |  | 2023-06-01 00:00:00
2022-12-01 00:00:00 | 30000 | 23170.34 |  | 2023-06-01 00:00:00