I would do this with macros. It might be possible with formulas, but I haven't found a way.