Perfect, done.

Now it will be perfect if a cell is hidden, don't use it when sorting.

Just only sort if a cell is visible.