LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default How do I sort by the first digit of a number?

Hi Laura,

This macro will change existing numbers to text:

Sub TextToNumbers()
Selection.TextToColumns Destination:=ActiveCell,
DataType:=xlFixedWidth, FieldInfo:=Array(0, 2)
End Sub

Highlight the cells containing numbers that you want to change to text
and run the code above. Once that's done, you can sort them, and they
will then indeed be in the order you requested.


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to validate a cell to insert from 9 digit number to 13 digit number. ramulu via OfficeKB.com Excel Worksheet Functions 1 February 21st 07 02:32 PM
How to validate a cell to insert from 9 digit number to 13 digit number. ramulu Excel Worksheet Functions 1 February 21st 07 10:00 AM
Color a single digit in a mult-digit number cell Phyllis Excel Discussion (Misc queries) 6 November 17th 05 12:46 AM
Tell users how to sort 5 digit and 9 digit zipcodes correctly aft. [email protected] New Users to Excel 1 February 18th 05 12:59 AM
When we enter a 16 digit number (credit card) the last digit chan. ceking Excel Discussion (Misc queries) 5 December 8th 04 11:45 PM


All times are GMT +1. The time now is 10:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"