Tables: Fixed sort ordering of formatted numbers

Fixes #5888
Merge pull request #5890 from pjackson28/fixformattednumbersort

Tables: Fixed sort ordering of formatted numbers