seperating rows

J

johnmclaren_99

i have an excel worksheet that is formatted as such

(number) (date) (conpany name) (street address) (city) (state)
(agent) (agent's name) (agent's address)
(officer) (officer's name) (officer's address)
blank line
(number) (date) (conpany name) (street address) (city) (state)
(agent) (agent's name) (agent's address)
(officer) (officer's name) (officer's address)
blank line
and so on...

sometimes there are more than one agent or officer, none of the
information can be sorted accurately by column. i want to maintain the
data between the blank lines. it must stay together, however, i want to
be able to sort by cities. is there any way to make excel sort the data
between the blank lines, and pick out words that i want?
 
J

Jef Gorbach

Since sort needs each group on 1-line, move the agent/officer data upto
their prior number line, sort, then move the data back to seperate lines.
I'd manipulate a copy of the sheet just-n-case.
 
D

David McRitchie

Hi John,
Not clear if each item is on a row, if several items are on a row
you have to be able to separate them by some means.

Have a look at later portions of the following which are
involved with getting data into separate cels on the same row.
http://www.mvps.org/dmcritchie/excel/snakecols.htm

If you really can't then you need to at least separate out the city
and then you assign cell in that all following rows same value
until a new city is found.
 
Top