Spreadsheet: 816733d1675796310-return-the-sum-at-first-occurrence-and-then-lookup-and-then-sum-or-substract-sum-or-subtract
Sheet: Sheet1

Please consider this color coding example as per Sr. | This column contains duplicate account number | Amount 1 | SUMIFS of column Q at first occurrence of the account number |  | Need formula to achieve this Final expected result by eliminating the process of column M and N and then Column D and Column E |  |  | This consumer numbers are unique | Amount 2 |  |  | This is the unique consumer records of column E | SUMIFS of column F
Sr | Account No | Amount 1 | SUMIFS of CoSUMIFS of Column | Lookup with column L and return the amount of column M | Final expected result |  |  | Account No | Amount 2 |  |  | Account No | SUMIFS
1 | [PHONE] | 1513.7 | 4646.52 |  |  |  |  | [PHONE] | 827.78 |  |  | [PHONE]
2 | [PHONE] | 1058.6 |  |  |  |  |  | [PHONE] | 882.93 |  |  | [PHONE]
3 | [PHONE] | 666.22 |  |  |  |  |  | [PHONE] | 1037.33 |  |  | [PHONE]
4 | [PHONE] | 1408 |  |  |  |  |  | [PHONE] | 1050.88 |  |  | [PHONE]
5 | [PHONE] | 1126.75 | 2765.38 |  |  |  |  | [PHONE] | 1061.55 |  |  | [PHONE]
6 | [PHONE] | 1010.3 |  |  |  |  |  | [PHONE] | 1123.34 |  |  | [PHONE]
7 | [PHONE] | 628.33 |  |  |  |  |  | [PHONE] | 1124.08 |  |  | [PHONE]
8 | [PHONE] | 937 | 28798.58 |  |  |  |  | [PHONE] | 1126.79 |  |  | [PHONE]
9 | [PHONE] | 870 |  |  |  |  |  | [PHONE] | 1217.53 |  |  | [PHONE]
10 | [PHONE] | 603.58 |  |  |  |  |  | [PHONE] | 1242.41 |  |  | [PHONE]
11 | [PHONE] | 768.8 | 4185.42 |  |  |  |  | [PHONE] | 1263.96 |  |  | [PHONE]
12 | [PHONE] | 544.6 |  |  |  |  |  | [PHONE] | 1395.57 |  |  | [PHONE]
13 | [PHONE] | 1274.45 | 2841.59 |  |  |  |  | [PHONE] | 1411.61 |  |  | [PHONE]
14 | [PHONE] | 932.1 |  |  |  |  |  | [PHONE] | 1420.36 |  |  | [PHONE]
15 | [PHONE] | 635.04 |  |  |  |  |  | [PHONE] | 1490.98
16 | [PHONE] | 634.4 |  |  |  |  |  | [PHONE] | 1693.43
17 | [PHONE] | 1686.22 |  |  |  |  |  | [PHONE] | 2029.54
18 | [PHONE] | 44008.8 | 77280.92000000001 |  |  |  |  | [PHONE] | 2043.08
19 | [PHONE] | 1816 |  |  |  |  |  | [PHONE] | 2162.78
20 | [PHONE] | 17554.4 |  |  |  |  |  | [PHONE] | 2595.19
21 | [PHONE] | 8696.720000000001 |  |  |  |  |  | [PHONE] | 2608.16
22 | [PHONE] | 830.5 | 830.5 |  |  |  |  | [PHONE] | 4208
23 | [PHONE] | 551.4 |  |  |  |  |  | [PHONE] | 4689.91
24 | [PHONE] | 62901 | 99653.8 |  |  |  |  | [PHONE] | 4710.68
25 | [PHONE] | 1995.1 |  |  |  |  |  | [PHONE] | 5072.34
26 | [PHONE] | 24947 |  |  |  |  |  | [PHONE] | 5129.11
27 | [PHONE] | 9810.7 |  |  |  |  |  | [PHONE] | 5758.79
28 | [PHONE] | 92837.8 | 146164.62 |  |  |  |  | [PHONE] | 6101.85
29 | [PHONE] | 2169.6 |  |  |  |  |  | [PHONE] | 7121.53
30 | [PHONE] | 36661.4 |  |  |  |  |  | [PHONE] | 7214.61
31 | [PHONE] | 14495.82 |  |  |  |  |  | [PHONE] | 7590.59
32 | [PHONE] | 843 | 843 |  |  |  |  | [PHONE] | 8560.77
33 | [PHONE] | -11683.25 | -11683.25 |  |  |  |  | [PHONE] | 8874.42
34 | [PHONE] | 1773.8 | 1773.8 |  |  |  |  | [PHONE] | 9175.3
35 | [PHONE] | 16666.4 | 16666.4 |  |  |  |  | [PHONE] | 10424.97
36 | [PHONE] | 6010.4 | 18119.8 |  |  |  |  | [PHONE] | 11376.08
 |  |  |  |  |  |  |  | [PHONE] | 11726.42
 |  |  |  |  |  |  |  | [PHONE] | 13056.01
 |  |  |  |  |  |  |  | [PHONE] | 14888.34
 |  |  |  |  |  |  |  | [PHONE] | 15356.08
 |  |  |  |  |  |  |  | [PHONE] | 15466.31
 |  |  |  |  |  |  |  | [PHONE] | 15997.34
 |  |  |  |  |  |  |  | [PHONE] | 16735.58
 |  |  |  |  |  |  |  | [PHONE] | 17415.35
 |  |  |  |  |  |  |  | [PHONE] | 17750.4
 |  |  |  |  |  |  |  | [PHONE] | 19529.59
 |  |  |  |  |  |  |  | [PHONE] | 19881.02
 |  |  |  |  |  |  |  | [PHONE] | 20134.16
 |  |  |  |  |  |  |  | [PHONE] | 20190.19
 |  |  |  |  |  |  |  | [PHONE] | 21730.6
 |  |  |  |  |  |  |  | [PHONE] | 21840.34
 |  |  |  |  |  |  |  | [PHONE] | 21958.17
 |  |  |  |  |  |  |  | [PHONE] | 22474.91
 |  |  |  |  |  |  |  | [PHONE] | 25509.16
 |  |  |  |  |  |  |  | [PHONE] | 26723.23
 |  |  |  |  |  |  |  | [PHONE] | 26900.62
 |  |  |  |  |  |  |  | [PHONE] | 28216.39
 |  |  |  |  |  |  |  | [PHONE] | 28937.27
 |  |  |  |  |  |  |  | [PHONE] | 31263.21
 |  |  |  |  |  |  |  | [PHONE] | 31765.69
 |  |  |  |  |  |  |  | [PHONE] | 34792.06
 |  |  |  |  |  |  |  | [PHONE] | 35279.82
 |  |  |  |  |  |  |  | [PHONE] | 36192.9
 |  |  |  |  |  |  |  | [PHONE] | 51965.52
 |  |  |  |  |  |  |  | [PHONE] | 54859.81
 |  |  |  |  |  |  |  | [PHONE] | 93217.8
 |  |  |  |  |  |  |  | [PHONE] | 143763.89
 |  |  |  |  |  |  |  | [PHONE] | 153349.83
 |  |  |  |  |  |  |  | [PHONE] | 182246.77
 |  |  |  |  |  |  |  | [PHONE] | 228248.29
 |  |  |  |  |  |  |  | [PHONE] | 255666.93
 |  |  |  |  |  |  |  | [PHONE] | 284936.74
 |  |  |  |  |  |  |  | [PHONE] | 297869.32
 |  |  |  |  |  |  |  | [PHONE] | 313982.71
 |  |  |  |  |  |  |  | [PHONE] | 400852.67
 |  |  |  |  |  |  |  | [PHONE] | 502015.96
 |  |  |  |  |  |  |  | [PHONE] | 976962.46
 |  |  |  |  |  |  |  | [PHONE] | 1057653.98
 |  |  |  |  |  |  |  | [PHONE] | 1867105.35