Title: Sorting numbers
Last modified: August 20, 2016

---

# Sorting numbers

 *  Resolved [footballperspective](https://wordpress.org/support/users/footballperspective/)
 * (@footballperspective)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/sorting-numbers/)
 * Having some trouble with sorting in one of my tables.
 * [http://www.footballperspective.com/larry-fitzgerald-innocent-bystander/](http://www.footballperspective.com/larry-fitzgerald-innocent-bystander/)
 * In the third/final table on that page, if you sort by the Yards column, it doesn’t
   sort numerically but alphabetically. Ditto the N+1 Rk column. Basically it’s 
   putting 1100 as lower than 200, and 300 as lower than 90.
 * Any thoughts?
 * [http://wordpress.org/extend/plugins/wp-table-reloaded/](http://wordpress.org/extend/plugins/wp-table-reloaded/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/sorting-numbers/#post-3255432)
 * Hi,
 * thanks for your question.
 * The problem here are the “–” entries in that column. Due to those, the JavaScript
   library that performs the sorting thinks that the column contains strings, and
   not numbers. And strings are sorted differently than numbers, and this leads 
   to the behavior that you currently experience.
    If just change the “–” entries
   to be empty, the sorting should work as expected on that column.
 * Regards,
    Tobias
 *  Thread Starter [footballperspective](https://wordpress.org/support/users/footballperspective/)
 * (@footballperspective)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/sorting-numbers/#post-3255433)
 * That makes a lot of sense and it works perfectly now. Thanks to much Tobias!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/sorting-numbers/#post-3255434)
 * Hi,
 * awesome! Great to hear that! 🙂
    Always nice, when fixes are so easy!
 * Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Sorting numbers’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-table-reloaded_f7dcd3.svg)
 * [WP-Table Reloaded](https://wordpress.org/plugins/wp-table-reloaded/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-table-reloaded/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-table-reloaded/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-table-reloaded/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-table-reloaded/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-table-reloaded/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/sorting-numbers/#post-3255434)
 * Status: resolved