I have the following table I need your help on.

mr excel question.xls | ||||||
---|---|---|---|---|---|---|

A | B | C | D | |||

3 | Sales | Margin | ||||

4 | 2,100,000 | 60,000 | ||||

5 | 2,000,000 | 50,000 | ||||

6 | 1,900,000 | 40,000 | ||||

7 | 1,800,000 | 30,000 | ||||

8 | 1,700,000 | 20,000 | ||||

9 | 1,600,000 | 18,000 | ||||

10 | 1,500,000 | 15,000 | ||||

11 | 1,400,000 | 20,000 | ||||

12 | ||||||

13 | >=2,000,000 | 4,100,000 | 110,000 | |||

14 | >1,600,000but<2,000,000 | 5,400,000 | 90,000 | |||

Sheet1 |

Basically it is a table with sales and margin figures.

At the bottom I have a summary total for all values > 2,000,000 and >1,600,000 and<2,000,000.

I need a formula that will sum this automatically. I assume a sumif but I am not sure how to apply it. Right now I am sort decending and then summing manually.

The second thing I need is a formula that will total the margin for all sales> 2,000,000 and for >1,600,000 and<2,000,000 condition.

Can someone please provide me with the formulas that will automate this for me.

Thanks,