View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Glenn Glenn is offline
external usenet poster
 
Posts: 1,240
Default sort by numbers of digits in cells

mab2819 wrote:
Hi,

I need to sort a large document by a certain column. That column consists of
numbers that are six digits and five digits. I need to insert a leading zero
in all those numbers that consist of only five digits. Some of those six
digit numbers already correctly have the leading zero, so when I sort, it
doesn't isolate the five digit ones. Any ideas on how I can do this?
TIA,


First, convert the entire column to numbers. Place a 1 in an open cell and copy
it. Select your list of data and the Paste Special / Values / Multiply. Then,
use a custom number format of 000000 to display the numbers with leading zeros.