The script I posted already calculates all columns (that are tied together at least with a non blank cell).
You can check for yourself, click any cell that you want to see the behavior and press CTRL + * (* can be on a upper case position,, add shift to it if so)
And you can changed the column head to sort with if you assign a variable to it.