Title: Number sorting issue
Last modified: January 10, 2025

---

# Number sorting issue

 *  Resolved [mikeamb](https://wordpress.org/support/users/mikeamb/)
 * (@mikeamb)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/number-sorting-issue/)
 * Hi all,
 * I’m in a bit of a pickle with sorting numbers and need some suggestions. Essentially
   I have a column for “network port speed” so the cell values are like the following:
   –
   10000 Mbps– 2000 Mbps– 1000 Mbps– 100 MbpsCurrently when the column is sorted
   descending I want the bigger full value number to show first, 10000 Mbps, however
   it shows 2000 Mbps as the highest value since presumably it has a 2 in front 
   instead of a 1, despite 10000 being a bigger value than 2000. How can I achieve
   this to sort the bigger full value? For example when sorting descending it shows:–
   2000 Mbps– 10000 Mbps– 1000 Mbps– 100 MbpsThe Mbps text afterwards doesn’t make
   any difference. I removed it to test and added custom code to sort without it
   if needed.
 * Thanks,

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/number-sorting-issue/#post-18236129)
 * Hi!
 * Thanks for your post and sorry for the trouble!
 * You could maybe try using the TablePress Extension from [https://tablepress.org/extensions/datatables-sorting-plugins/](https://tablepress.org/extensions/datatables-sorting-plugins/)
   here, to add a custom sorting algorithm.
 * However, it’s strange that your tests without the “Mbps” text failed here… That
   indicates that there’s maybe other text in that column? Can you please send me
   a link to the page with the table where this problem happens, so that I can take
   a direct look? Thanks!
 * Best wishes,
   Tobias
 *  Thread Starter [mikeamb](https://wordpress.org/support/users/mikeamb/)
 * (@mikeamb)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/number-sorting-issue/#post-18237621)
 * Hi Tobias,
   I tried again removing the text after it and it did work this time
   and sorting shows 10000 above 2000 now unlike before. Not sure what was wrong,
   but I think it might have been a caching issue last time. Either way, all works
   now so this was nothing with the plugin. Thanks for replying!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/number-sorting-issue/#post-18237953)
 * Hi,
 * great to hear that this helped!
 * Just to clarify, did you remove the “Mbps” or was there additional text that 
   you removed?
 * Best wishes,
   Tobias

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

The topic ‘Number sorting issue’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

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