Spreadsheet: 863538d1710982063-formula-to-subtotal-values-based-on-multiple-criteria-example-data-solution-
Sheet: Sheet6

 | Type | Invoice # | Date Sold | Product ID | Trade | Trade STE | GM | GM% | AGMNT
 | New | 5618089 | 15/2/2024 | 355391 |  |  | 258.12 | 14,75% | $         -
 | Used | 5617567 | 15/2/2024 | 1039133 |  |  | 3950 | 1,95% | $         -
 | New | 5617537 | 15/2/2024 | 353470 |  |  | 7672.08 | 13,11% | $         -
 | New | 5617558 | 15/2/2024 | 350402 |  |  | 1788.47 | 7,27% | $         -
 | New | 5617558 | 15/2/2024 | 350816 | 1039242 | Not Loaded | 9360.19 | 7,36% | $         -
 | New | 5617558 | 15/2/2024 | 350401 |  |  | 12044.12 | 3,39% | $         -
 | New | 5617574 | 15/2/2024 | 342146 |  |  | 805.02 | 9,69% | $         -
 | New | 5617558 | 15/2/2024 | 350397 | 1039133 |  | 11414.49 | 2,20% | $         -
 | New | 5617971 | 15/2/2024 | 355595 |  |  | 861.92 | 13,26% | $         -
 | New | 5607276 | 2024-01-02 00:00:00 | 357231 |  |  | 2798 | 10,03% | $         -
 | New | 5607109 | 31/1/2024 | 351606 |  |  | 3052.44 | 11,35% | $         -
 | New | 5607109 | 31/1/2024 | 351605 | 1039264 | Not Loaded | 336.71 | 1,25% | $         -
 | New | 5607074 | 31/1/2024 | 342967 | 1039254 |  | 887.74 | 7,40% | $         -
 | New | 5607072 | 31/1/2024 | 350354 |  |  | 3387.95 | 11,89% | $         -
 | New | 5607070 | 31/1/2024 | 341332 |  |  | 823.46 | 7,10% | $         -
 | New | 5606782 | 31/1/2024 | 344628 |  |  | 99.81 | 15,97% | $         -
 | New | 5606734 | 31/1/2024 | 356094 |  |  | 102.25 | 12,03% | $         -
 | Used | 5606724 | 31/1/2024 | 1038779 | 1039253 | Not Loaded | 1818.79 | 3,53% | $         -
 | Used | 5606722 | 31/1/2024 | 1038600 |  |  | 1435.63 | 1,22% | $         -
 | New | 5606713 | 31/1/2024 | 355723 |  |  | 252.41 | 21,03% | $         -
 | Used | 5606662 | 31/1/2024 | 1038159 | 1038978 | Not Loaded | 529.95 | 3,21% | $         -
 | New | 5606642 | 31/1/2024 | 351584 |  |  | 502.83 | 7,39% | $         -
 | Used | 5603703 | 26/1/2024 | 1031042 |  |  | 267.07 | 17,80% | $         -
 | New | 5603692 | 26/1/2024 | 343710 |  |  | 1194.17 | 4,12% | $   697,00
 | New | 5603638 | 26/1/2024 | 318300 |  |  | 200 | 27,70% | $         -
 | Used | 5603638 | 26/1/2024 | 1038987 | 10392191039220 | Not Loaded | 2368.12 | 4,74% | $         -
 | New | 5603638 | 26/1/2024 | 301735 |  |  | 777 | 99,87% | $         -
 | Used | 5603632 | 26/1/2024 | 1036646 |  |  | 2738.74 | 28,83% | $         -
 | New | 5603166 | 25/1/2024 | 345726 |  |  | 2230.41 | 17,16% | $         -
 | New | 5603160 | 25/1/2024 | 355727 |  |  | 4573.7 | 13,07% | $         -
 | New | 5603152 | 25/1/2024 | 333590 | 1039231 | Not Loaded | 2886 | 4,11% | $         -
 | New | 5603152 | 25/1/2024 | 337925 |  |  | 486.64 | 5,59% | $         -
 | Used | 5596758 | 2024-11-01 00:00:00 | 1037585 |  |  | 9953.62 | 2,40% | $         -
 | New | 5596717 | 2024-11-01 00:00:00 | 350012 | 10386591038660 | Not Loaded | 847.47 | 10,11% | $   716,00
 | New | 5596717 | 2024-11-01 00:00:00 | 350013 |  |  | -229.66 | -16,99% | $         -
 | New | 5596707 | 2024-11-01 00:00:00 | 339992 |  |  | 444.4 | 24,69% | $         -
 | New | 5596613 | 2024-10-01 00:00:00 | 337963 |  |  | 2478.98 | 4,72% | $         -
 |  |  |  |  |  |  | Total GM for invoices with Trade STE "Not Loaded"
 |  |  |  |  |  |  | Should = | 36266.24
 |  |  |  |  |  |  | Solution: