Another way to do it is to compute the RA/Dec of the Sun, then use the algorithm from Meeeus' Astronomical Algorithms1,2 to compute the rise and set times for a given RA/Dec.
Below is a the algorithm for the low precision Sun position algorithm provided in the Astronomical Almanac, it is accurate to 1 degree between 1950 and 2050. And an implementation in JavaScript follows.
\begin{align*}
n&=jd-2451545.0
\\
L&=280.460+0.9856474*n
\\
g&=375.528+.9856003*n
\\
\lambda &=L+1.915*\sin g+0.020*\sin(2*g)
\\
\beta&=0.0
\\
\epsilon &=23.439-0.0000004*n
\\
\tan \alpha &=\frac{\cos(\epsilon)*\sin(\lambda)}{\cos(\lambda)}
\\
\sin \delta &=\sin(\epsilon)*\sin(\lambda)
\end{align*}
Where $\lambda$ is the ecliptic longitude, $\beta$ is the ecliptic latitude (always 0), $\alpha$ is the Right Ascension,
and $\delta$ is the Declination.
Implementation in Javascript:
function sunPosition(jd) {
const torad=Math.PI/180.0;
const n=jd-2451545.0;
let L=(280.460+0.9856474*n)%360;
let g=((375.528+.9856003*n)%360)*torad;
if(L<0){L+=360;}
if(g<0){g+=Math.PI*2.0;}
const lamba=(L+1.915*Math.sin(g)+0.020*Math.sin(2*g))*torad;
const beta=0.0;
const eps=(23.439-0.0000004*n)*torad;
let ra=Math.atan2(Math.cos(eps)*Math.sin(lamba),Math.cos(lamba));
const dec=Math.asin(Math.sin(eps)*Math.sin(lamba));
if(ra<0){ra+=Math.PI*2;}
return [ra/torad/15.0,dec/torad];
}
To compute the rise and set times:
$$
\cos H_0 = \dfrac{\sin h_0 - \sin \varphi \sin \delta }{\cos \varphi \cos \delta}
$$
If $\cos H_0$ < -1 or > 1, the point is either always above or below the horizon.
$$
\begin{align}
T &= (jd-2451545.0)/36525.0
\\
\Theta_0 &= 280.46061837+360.98564736629*(jd-2451545.0)+0.000387933T^2 - T^3/38710000.0
\end{align}
$$
\begin{cases}
transit & \dfrac{\delta + L - \Theta_0 }{360^{\circ}} \\
\\
rise & transit - \dfrac{H_0}{360^{\circ}} \\
\\
set & transit + \dfrac{H_0}{360^{\circ}}
\end{cases}
$ jd $ is the Julian Date for the date in question.
$\delta$ Declination
$L$ Longitude
$\varphi$ Latitude
$h_0$ Apparent rise or set angle, -0.8333 for the Sun, +0.125 for the Moon, and -0.5667 for most other objects.
$\Theta_0$ Greenwich sidereal time at 0h for the day in question.
And this page has a JavaScript implementation to compute the Sun rise, set, and transit using the algorithms above.
You might also be interested in the book "Practical Astronomy with your Calculator or Spreadsheet" by Peter Duffett-Smith and Jonathan Zwart. It has similar algorithms, but is more specific to doing it with a spreadsheet.