Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel
external usenet poster
 
Posts: 1
Default NAICS Code Cell Format

Hello,

I recently downloaded some US Census data (NAICS codes) into Excel and
they have a cell format that I am unable to change. When I sort a list
of numbers (e.g. 10, 12, 101, 111, 112), rather than sorting these
numbers from lowest to highest (or vice versa), the numbers are sorted
as follows:

CURRENT SORT
10
101
111
112
12

DESIRED SORT
10
12
101
111
112

The list is being sorted as if the numbers have a hidden decimal after
the first two numbers. I have tried to altering the number format to
no avail. Does anyone have a suggestion for how I can change the cell
format so that the numbers sort properly?

Thank you in advance for your help.

  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel
external usenet poster
 
Posts: 8,856
Default NAICS Code Cell Format

Though these look like numbers, they are being stored by Excel as text
values. One way to convert them is to select a blank cell somewhere
and click <copy, then highlight the offending "numbers" and Edit |
Paste Special | Add (check) | OK then <Esc. You should see the
numbers align to the right of the cell, then you can apply your sort
again.

Hope this helps.

Pete

On Mar 2, 10:26 pm, wrote:
Hello,

I recently downloaded some US Census data (NAICS codes) into Excel and
they have a cell format that I am unable to change. When I sort a list
of numbers (e.g. 10, 12, 101, 111, 112), rather than sorting these
numbers from lowest to highest (or vice versa), the numbers are sorted
as follows:

CURRENT SORT
10
101
111
112
12

DESIRED SORT
10
12
101
111
112

The list is being sorted as if the numbers have a hidden decimal after
the first two numbers. I have tried to altering the number format to
no avail. Does anyone have a suggestion for how I can change the cell
format so that the numbers sort properly?

Thank you in advance for your help.



  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel
external usenet poster
 
Posts: 8,856
Default NAICS Code Cell Format

Just to follow up (for the archives), he emailed me directly to say
that "... the process worked without a hitch...".

Pete

On Mar 2, 10:38 pm, "Pete_UK" wrote:
Though these look like numbers, they are being stored by Excel as text
values. One way to convert them is to select a blank cell somewhere
and click <copy, then highlight the offending "numbers" and Edit |
Paste Special | Add (check) | OK then <Esc. You should see the
numbers align to the right of the cell, then you can apply your sort
again.

Hope this helps.

Pete

On Mar 2, 10:26 pm, wrote:



Hello,


I recently downloaded some US Census data (NAICS codes) into Excel and
they have a cell format that I am unable to change. When I sort a list
of numbers (e.g. 10, 12, 101, 111, 112), rather than sorting these
numbers from lowest to highest (or vice versa), the numbers are sorted
as follows:


CURRENT SORT
10
101
111
112
12


DESIRED SORT
10
12
101
111
112


The list is being sorted as if the numbers have a hidden decimal after
the first two numbers. I have tried to altering the number format to
no avail. Does anyone have a suggestion for how I can change the cell
format so that the numbers sort properly?


Thank you in advance for your help.- Hide quoted text -


- Show quoted text -



  #4   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel
external usenet poster
 
Posts: 1
Default NAICS Code Cell Format

You probably know this, but for the benefit of the doubt, thought I'd throw
this note in here.

The true structure of those NAICS codes is that the first 2 numbers are a
broad category, and any numbers to the right introduce a more narrow
category, up to 6 digits total. They had the structure set up the way they
did (as a text outline) so that it would properly sort related sub-items
directly underneath their parents. You actually hit the nail on the head
when you suggested the imaginary decimal: 10 as a "parent", then 10.1 as a
"child" node, etc.

-KC

wrote in message
oups.com...
Hello,

I recently downloaded some US Census data (NAICS codes) into Excel and
they have a cell format that I am unable to change. When I sort a list
of numbers (e.g. 10, 12, 101, 111, 112), rather than sorting these
numbers from lowest to highest (or vice versa), the numbers are sorted
as follows:

CURRENT SORT
10
101
111
112
12

DESIRED SORT
10
12
101
111
112

The list is being sorted as if the numbers have a hidden decimal after
the first two numbers. I have tried to altering the number format to
no avail. Does anyone have a suggestion for how I can change the cell
format so that the numbers sort properly?

Thank you in advance for your help.



Reply
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
Time Code in Cell format ? [email protected] Excel Discussion (Misc queries) 3 December 10th 06 11:29 AM
Time code cell format pauls510 Excel Worksheet Functions 1 November 24th 05 05:53 PM
How to refer to a cell format code? A difficult problem Excel Discussion (Misc queries) 1 May 25th 05 08:42 AM
Format the Cell into a telephone number but using country code Chris Quinn Excel Discussion (Misc queries) 1 January 27th 05 03:51 PM
zip code format Rachel Excel Discussion (Misc queries) 1 January 11th 05 07:57 PM


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

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

About Us

"It's about Microsoft Excel"