The formula in D1 is: =sum_color(D2:D1000,$A1)
The formula in D1 should be: =sum_color(D$6:D$221,$A1)
You only have 221 Rows of data
Also if you Look at D2 and D3 you will notice that it isn't referring to the correct ranges as the lack of $ allows the formula to be copied down relatively not absolutely
I would also restrict copying the columns to just enough to suit your data
Most of your columns have no data in them, but still need to be calculated