ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help sorting text as numbers (https://www.excelbanter.com/excel-worksheet-functions/165805-help-sorting-text-numbers.html)

[email protected]

Help sorting text as numbers
 
Is it possible to have a cell display text but have a numeric value?

I am looking to correctly sort publications. Cell values are
"January","February", etc. Sorting them puts them in alphabetical
order, so I would like the cell to say "January" but when I sort, have
it recognized as "1".

I'm hoping whatever solution might be available will also help sort a
different text field with the same problem. Values would be "45 (1)",
"46 (2)", "3", "4", "5", "6", and I would like "45 (1)" to come first.
Current sorting puts it at the bottom.

Any help would be appreciated. Thx.


Jim Cone

Help sorting text as numbers
 


Add a custom list with the months in the correct order...
Tools | Options | Custom Lists.

After adding the list, you can use it when sorting...
Data | Sort | Options (button) | First key sort order (drop down)
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)



devproduct
wrote in message
Is it possible to have a cell display text but have a numeric value?
I am looking to correctly sort publications. Cell values are
"January","February", etc. Sorting them puts them in alphabetical
order, so I would like the cell to say "January" but when I sort, have
it recognized as "1".
I'm hoping whatever solution might be available will also help sort a
different text field with the same problem. Values would be "45 (1)",
"46 (2)", "3", "4", "5", "6", and I would like "45 (1)" to come first.
Current sorting puts it at the bottom.
Any help would be appreciated. Thx.



All times are GMT +1. The time now is 11:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com