Spreadsheet: 728742d1618594541-formula-to-create-a-report-of-differences-between-ins-and-outs-diff
Sheet: Sheet1

 | In | Material 1 | Material 2 | Material 3 | Material 4 | Material 5 | Material 6 | Material 7 | Material 8 | Material 9 | Material 10 | Total |  |  | Out | Material 1 | Material 2 | Material 3 | Material 4 | Material 5 | Material 6 | Material 7 | Material 8 | Material 9 | Material 10 | Total |  | Diff | Material 1 | Material 2 | Material 3 | Material 4 | Material 5 | Material 6 | Material 7 | Material 8 | Material 9 | Material 10 | Total
 | 2021-04-01 00:00:00 | 37.46 | 227.62 | 0 | 0 | 0 | 0 | 0 | 403.78 | 0 | 0 |  |  |  |  | 37.46 | 227.62 | 0 | 0 | 0 | 0 | 0 | 403.78 | 0 | 0
 | 2021-04-02 00:00:00 | 94.14 | 248.68 | 0 | 0 | 0 | 0 | 0 | 276.46 | 0 | 21.48 |  |  |  |  | 94.14 | 248.68 | 0 | 0 | 0 | 0 | 0 | 276.46 | 0 | 21.48
 | 2021-04-03 00:00:00 | 36.4 | 107.78 | 0 | 0 | 0 | 0 | 0 | 133.18 | 0 | 0 |  |  |  |  | 36.4 | 107.78 | 0 | 0 | 0 | 0 | 0 | 133.18 | 0 | 0
 | 2021-04-04 00:00:00 | 90.66 | 170.48 | 0 | 0 | 0 | 85.44 | 0 | 95.74 | 0 | 17.44 |  |  |  |  | 90.66 | 170.48 | 0 | 0 | 0 | 85.44 | 0 | 95.74 | 0 | 17.44
 | 2021-04-05 00:00:00 | 58.56 | 128.44 | 0 | 0 | 0 | 269.62 | 0 | 278.34 | 0 | 0 |  |  |  |  | 58.56 | 128.44 | 0 | 0 | 0 | 269.62 | 0 | 278.34 | 0 | 0
 | 2021-04-06 00:00:00 | 146.66 | 144.64 | 0 | 0 | 0 | 219.16 | 0 | 135.38 | 0 | 0 |  |  |  |  | 146.66 | 144.64 | 0 | 0 | 0 | 219.16 | 0 | 135.38 | 0 | 0
 | 2021-04-07 00:00:00 | 148.04 | 325.1 | 0 | 0 | 0 | 15.8 | 0 | 193.62 | 0 | 0 |  |  |  |  | 148.04 | 325.1 | 0 | 0 | 0 | 15.8 | 0 | 193.62 | 0 | 0
 | 2021-04-08 00:00:00 | 104.84 | 26.16 | 0 | 0 | 0 | 158.98 | 0 | 318.06 | 0 | 0 |  |  |  |  | 104.84 | 26.16 | 0 | 0 | 0 | 158.98 | 0 | 318.06 | 0 | 0
 | 2021-04-09 00:00:00 | 244.84 | 93.24000000000001 | 0 | 0 | 0 | 77.18 | 0 | 184.64 | 19.93999999999999 | 0 |  |  |  |  | 244.84 | 93.24 | 0 | 0 | 0 | 77.18 | 0 | 152.52 | 0 | 0
 | 2021-04-10 00:00:00 | 316.48 | 217.86 | 0 | 0 | 0 | 16.42 | 0 | 140.76 | 28.14 | 0 |  |  |  |  | 316.48 | 217.86 | 0 | 0 | 0 | 16.42 | 0 | 140.76 | 0 | 0
 | 2021-04-11 00:00:00 | 268.92 | 276.52 | 0 | 0 | 0 | 16.48 | 0 | 238.48 | 0 | 0 |  |  |  |  | 268.92 | 276.52 | 0 | 0 | 0 | 16.48 | 0 | 238.48 | 0 | 0
 | 2021-04-12 00:00:00 | 278.2 | 269.22 | 0 | 0 | 0 | 23.46 | 1.54 | 216.32 | 33.7 | 0 |  |  |  |  | 278.2 | 269.22 | 0 | 0 | 0 | 23.46 | 0 | 216.32 | 0 | 0
 | 2021-04-13 00:00:00 | 210.76 | 100.84 | 0 | 0 | 0 | 0 | 0 | 432.38 | 0 | 0 |  |  |  |  | 210.76 | 100.84 | 0 | 0 | 0 | 0 | 0 | 432.38 | 0 | 0
 | 2021-04-14 00:00:00 | 307.26 | 121.44 | 0 | 0 | 0 | 61.02 | 0 | 230.92 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-15 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-16 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-17 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-18 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-19 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-20 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-21 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-22 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-23 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-24 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-25 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-26 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-27 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-28 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-29 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 2021-04-30 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | 00:00:00 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |  |  |  |  | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
 | Total |  |  |  |  |  |  |  |  |  |  |  |  |  | Total |  |  |  |  |  |  |  |  |  |  |  |  | Total
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Could you help me in my question,please?
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | I have the following tables for quantities  of materials:  1-In 2-Out 3-Diff(In-Iut)
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | I need a formula to create a report of differences between INs and OUTs like the following report:
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | The report should be sorted by Material then Date
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Material | Date | In | Out | Diff
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | 2021-04-14 00:00:00 | 307.26 | 0 | 307.26
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Material 2 | 2021-04-14 00:00:00 | 121.44 | 0 | 121.44
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Material 6 | 2021-04-14 00:00:00 | 61.02 | 0 | 61.02
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Material 7 | 2021-04-12 00:00:00 | 1.54 | 0 | 1.54
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Material 8 | 2021-04-09 00:00:00 | 184.64 | 152.52 | 32.12
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Material 8 | 2021-04-14 00:00:00 | 230.92 | 0 | 230.92
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Material 9 | 2021-04-09 00:00:00 | 19.94 | 0 | 19.94
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Material 9 | 2021-04-10 00:00:00 | 28.14 | 0 | 28.14
 |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |  | Material 9 | 2021-04-12 00:00:00 | 33.7 | 0 | 33.7