Formulas (at least the kind people typically use) are not Turing complete, so they are not as powerful as what most people associate with the word "code".
Edit: I know there are lots of people on the Internet saying you can simulate Turing machines in excel, but they're usually manually unrolling the computation in successive rows, which doesn't really count. For one thing, this style of simulation doesn't even allow one to make an infinite loop, let alone a more complex self-contained loop.
Edit: I know there are lots of people on the Internet saying you can simulate Turing machines in excel, but they're usually manually unrolling the computation in successive rows, which doesn't really count. For one thing, this style of simulation doesn't even allow one to make an infinite loop, let alone a more complex self-contained loop.