This is my first post on these forums but I hope you find some useful information.
Remember there are two types of chi-square analyses the chi-square goodness of fit and the chi-square test of independence.
Now it looks like (from your Excel file) you are running two chi-square test of independence. The degrees of freedom for this test are (# of Rows - 1)*(# of Columns - 1) or (R-1)(C-1). For the first example in your Excel file df = (3-1)(3-1) = 4.
It looks like you calculated the expected values correctly.
So the formula for both chi-square is as you stated:
X2 = SUM[(observed - expected)^2 / Expected]
Which to the right of your observed values you seem to have done correctly for all but one of the cells underneath the expected frequencies. (GRADES 6 and goals)
Now based on the formula above just sum all these up to get your X^2 observed. To do this type =SUM(***) for the *** use your mouse to select all the (observed - expected)^2 / Expected values you calculated
To get the p-value type =CHIDIST(F17,4) where F17 is where I had my calcualted X^2 value from above.
I hope this helps!