A custom function cannot affect cells other than those it returns a
value to. In other words, a custom function cannot edit arbitrary
cells, only the cells it is called from and their adjacent cells. To
edit arbitrary cells, use a custom menu to run a function instead.