Set up a column of x values in increments of h = (ba)/n. (In our example of x^{2} on the interval from 2 to 8, with n = 8, this is h = 0.75.) See Filling Down in the Excel help file for help with this step.
Next, fill in the y values in a column next to the x values. If you have a formula for this, this is easy in Excel by filling down the formula.
In our example, all of this leaves us with the following table:
A 
B 

1 
x 
f(x) 
2 
2.00 
4.00 
3 
2.75 
7.56 
4 
3.50 
12.25 
5 
4.25 
18.06 
6 
5.00 
25.00 
7 
5.75 
33.06 
8 
6.50 
42.25 
9 
7.25 
52.56 
10 
8.00 
64.00 
In this case, the formula we entered in B2 was =A2^2. All numbers above have been restricted to two decimal places.
Now we need our constants.