Spreadsheet: 846011d1697305182-manipulate-dynamic-array-change-column-order-apply-formula-by-column-dynamic-array-training-copy
Sheet: Planilha1

 |  |  |  |  |  |  |  |  |  |  | Data |  |  |  | My attemp
 |  |  | Other attemps |  |  |  |  |  |  | HEADERS | Item | Price | Date |  | 1 step |  |  |  | 2 step |  |  |  | 3 step
 |  |  | a | b | c |  | a | b | c |  | Grape Fruit | 100 | 2023-10-12 00:00:00 |  |  | 100 | 45211 |  |  | 100 | 45211 |  |  | 100 | 45211
 |  |  | 2 | 2 | 2 |  |  | 1 | 40 |  | Orange Fruit | 150 | 2023-10-13 00:00:00 |  | Orange Fruit | 150 | 45212 |  | Orange Fruit | 150 | 45212 |  | Orange Fruit | 150 | 45212
 |  |  | 2 | 2 | 2 |  | 2 | 1 | 40 | SEPARATOR | ----------- | ----------- | ----------- |  | Orange Fruit | 50 | 45213 |  | Orange Fruit | 50 | 45213 |  | Orange Fruit | 50 | 45213
 |  |  | 2 | 2 | 2 |  | 2 | 1 | 40 |  | Grape Fruit | 100 | 2023-10-12 00:00:00 |  | Grape Fruit | 190 | 45214
 |  |  | 2 | 2 | 2 |  | 2 | 1 | 40 |  | Orange Fruit | 150 | 2023-10-13 00:00:00 |  | Orange Fruit | 50 | 45213
 |  |  | 2 | 2 | 2 |  | 2 | 1 | 40 |  | Orange Fruit | 50 | 2023-10-14 00:00:00 |  | Grape Fruit | 190 | 45214
 |  |  | 2 | 2 | 2 |  | 2 | 1 | 40 |  | Grape Fruit | 190 | 2023-10-15 00:00:00
 |  |  |  |  |  |  |  |  |  |  | Orange Fruit | 50 | 2023-10-14 00:00:00 |  | 3 step |  |  |  |  |  |  |  | 4 step
 |  |  |  |  |  |  |  |  |  |  | Grape Fruit | 190 | 2023-10-15 00:00:00 |  |  | Price | Date |  | Grape Fruit | 100 | 45211 |  |  | Price | Date |  | Item | Price | Date |  | Item | Price | Date |  | Item | Price | Date
 |  |  |  |  |  |  |  |  |  |  | ----------- | ----------- | ----------- |  | Grape Fruit | 100 | 45211 |  | Orange Fruit | 150 | 45212 |  | Grape Fruit | 100 | 45211 |  | Grape Fruit | 100 | 45211 |  | Grape Fruit | 100 | 45211 |  | Grape Fruit | 100 | 45211
 |  |  |  |  |  |  |  |  |  |  | Grape Fruit | 100 | 2023-10-12 00:00:00 |  | Orange Fruit | 150 | 45212 |  | Orange Fruit | 50 | 45213 |  | Orange Fruit | 150 | 45212 |  | Orange Fruit | 150 | 45212 |  | Orange Fruit | 150 | 45212 |  | Orange Fruit | 150 | 45212
 |  |  |  |  |  |  |  |  |  |  | Orange Fruit | 150 | 2023-10-13 00:00:00 |  |  |  |  |  | Grape Fruit | 190 | 45214 |  |  |  |  |  | Orange Fruit | 50 | 45213 |  | Orange Fruit | 50 | 45213 |  | Orange Fruit | 50 | 45213
 |  |  |  |  |  |  |  |  |  |  | Orange Fruit | 50 | 2023-10-14 00:00:00 |  |  |  |  |  | Orange Fruit | 50 | 45213 |  |  |  |  |  | Grape Fruit | 190 | 45214
 |  |  |  |  |  |  |  |  |  |  | ----------- | ----------- | ----------- |  |  |  |  |  | Grape Fruit | 190 | 45214 |  |  |  |  |  | Orange Fruit | 50 | 45213
 |  |  |  |  |  |  |  |  |  |  | Grape Fruit | 100 | 2023-10-12 00:00:00 |  |  |  |  |  |  |  |  |  |  |  |  |  | Grape Fruit | 190 | 45214
 |  |  | 1st attempt |  |  |  |  |  |  |  | Orange Fruit | 150 | 2023-10-13 00:00:00 |  | 5 step | Is that possible without "names"?
 |  |  |  |  |  |  |  |  |  |  | Orange Fruit | 50 | 2023-10-14 00:00:00 |  |  | How could I go further? I stop here.
 |  |  |  |  |  |  |  |  |  |  | ----------- | ----------- | -----------
 |  |  |  |  |  |  |  |  |  |  | What I Want (Single Formula) |  | My goal is just learning
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Balance | 250 |  |  | Balance | 980 |  |  | Balance | 1280
 |  |  |  |  |  |  |  |  |  |  | Item | Price | Date |  | Item | Price | Date |  | Item | Price | Date |  | Item | Price | Date
 |  |  |  |  |  |  |  |  |  |  | Grape Fruit | 100 | 2023-10-12 00:00:00 |  | Grape Fruit | 100 | 2023-10-12 00:00:00 |  | Grape Fruit | 100 | 2023-10-12 00:00:00 |  | Grape Fruit | 100 | 2023-10-12 00:00:00
 |  |  |  |  |  |  |  |  |  |  | Orange Fruit | 150 | 2023-10-13 00:00:00 |  | Orange Fruit | 150 | 2023-10-13 00:00:00 |  | Orange Fruit | 150 | 2023-10-13 00:00:00 |  | Orange Fruit | 150 | 2023-10-13 00:00:00
 |  |  |  |  |  |  |  |  |  |  | Total | 250 |  |  | Orange Fruit | 50 | 2023-10-14 00:00:00 |  | Orange Fruit | 50 | 2023-10-14 00:00:00 |  | Orange Fruit | 50 | 2023-10-14 00:00:00
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Grape Fruit | 190 | 2023-10-15 00:00:00 |  | Total | 1280 |  |  | Orange Fruit | 51 | 2023-10-15 00:00:00
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Orange Fruit | 50 | 2023-10-14 00:00:00 |  |  |  |  |  | Final Total | 351
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Grape Fruit | 190 | 2023-10-15 00:00:00
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Total | 980