#1   Report Post  
Sharon
 
Posts: n/a
Default Sorting in Excel

I have a very large database that I need to be able to sort by state.
Unfortunately, whoever put the database together including city,state,zip all
in the same column. Is there any way that I can still sort by state without
retyping (retyping is not an option bc there are over 7000 entries)?
  #2   Report Post  
B. R.Ramachandran
 
Posts: n/a
Default

Hi,

The following are probably two of many possible ways to accomplish what you
want.

Method A:
You could easily separate the city-state-zip info into three individual
columns without having to retype the data.
1. Insert two blank columns on the right-hand side of the column
containing the combined data.
2. Select the entire column, click on 'Data' (in the Toolbar) = 'Text
to Columns' = 'Next' (to go to page 2 of the 'Convert text to columns
wizard') = select the the delimiting character(s) (e.g, comma and space)
that separate the three components (city, state, and ZIP) and click 'Next' =
'Finish'.

Method B (This assumes that the combined column contains the state data as
two letter abbreviations and the ZIP codes as 5 numbers)
1. Insert a blank column on the right-hand side of the column
containing the combined info (let's say A)
2. Enter the formula in the first data-containing cell of the newly
inserted column (let's say B2)
=LEFT(RIGHT(A2,8),2)
and fill down the column B with the formula (the shortcut for this is,
select B2, and move the cursor pointer to the bottom-right corner of the
highlighted cell, and double click)

Regards,
B.R.Ramachandran



"Sharon" wrote:

I have a very large database that I need to be able to sort by state.
Unfortunately, whoever put the database together including city,state,zip all
in the same column. Is there any way that I can still sort by state without
retyping (retyping is not an option bc there are over 7000 entries)?

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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Excel startup switches Randy Excel Discussion (Misc queries) 9 June 14th 05 10:27 PM
Microsoft Excel - Grouping and Sorting Cells Michael Blogg Excel Discussion (Misc queries) 1 May 26th 05 12:50 PM
how to convert GETPIVOTDATA from excel 2000 to excel 2002... Need_help_on_excel Excel Worksheet Functions 1 March 15th 05 01:08 AM
Difference in number of Excel NewsGroups Hari Prasadh Excel Discussion (Misc queries) 1 January 25th 05 11:32 AM


All times are GMT +1. The time now is 09:02 PM.

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"