You can do this with worksheet formula, using the method that Gauss
(allegedly) devised as a schoolboy. This solution assumes that the first
number goes in A1, the second in A2, and allows for starting values that are
odd or even, and the last number being odd or even (this affects the
solution, because the basic method assumes an even number of entries
=IF(OR(AND(MOD(A1,2)>0,MOD(A2,2)=0),AND(MOD(A1,2)=0,MOD(A2,2)>0)),(A2+A1)*IN
T((A2-A1+1)/2),A1+(A1+1+A2)*INT((A2-(A1+1)+1)/2))
or a bit simpler
=IF(MOD(A2-A1,2),(A2+A1)*INT((A2-A1+1)/2),A1+(A1+1+A2)*INT((A2-(A1+1)+1)/2))