And what is the formula?
There's no problem to sort the the table the 'right' way. Does it help ?