Sorting blank rows in Excel

G

glissonk

Hello,

I have a worksheet that exists of the following:

Student ID Last Name First Name
1234567 Doe John
x
x
x
x
x


The x's above indicate blank rows - this is set up for multiple students.

When I do a sort, the blank rows are ignored - how can I include the blank rows for each student during a sort?

Thanks

Keith
 
W

warnimont

-----Original Message-----
Hello,

I have a worksheet that exists of the following:

Student ID Last Name First Name
1234567 Doe John
x
x
x
x
x


The x's above indicate blank rows - this is set up for multiple students.

When I do a sort, the blank rows are ignored - how can
I include the blank rows for each student during a sort?
Thanks

Keith
.
I dont understand. Each ROW (blank) is not associated
with a "student". What is your objective?
 
A

Ann Shaw

Hi Keith

I needed to do this previously, and found that the easiest
way was to set up and record a Macro to sort the cell
range that you want. That way when you run the macro, the
blanks cells will be included in your sort.

Tools - Macro - record new macro.
Select the cell range to sort click the Data Menu - Sort -
by whichever columns you want. Click ok.
Click the Stop Recording button (the little blue square on
the recording toolbar)
Each time you run the macro now the data will sort the
correct way for you.

Hope this helps!

Ann
-----Original Message-----
Hello,

I have a worksheet that exists of the following:

Student ID Last Name First Name
1234567 Doe John
x
x
x
x
x


The x's above indicate blank rows - this is set up for multiple students.

When I do a sort, the blank rows are ignored - how can I
include the blank rows for each student during a sort?
 
A

Andy B

Hi

If I understand you right, you want to keep the top line and the spaces
under it together. One way is to replace the blank Student ID lines with the
existing student ID.
Select the range/column of Student IDs. Hit F5, Special . . Blanks. This
will select all of the blank student ID rows. Type = and hit the up arrow
and then type Ctrl Enter. To fix these values use Copy then Paste Special /
Values.

--
Andy.


glissonk said:
Hello,

I have a worksheet that exists of the following:

Student ID Last Name First Name
1234567 Doe John
x
x
x
x
x


The x's above indicate blank rows - this is set up for multiple students.

When I do a sort, the blank rows are ignored - how can I include the
blank rows for each student during a sort?
 
H

hmws

Could you not include a column to the left with numbers
from 1 - 500 (no of students) say and include that column
in your sort?

You don't need to select it for display/print purposes
-----Original Message-----
Hello,

I have a worksheet that exists of the following:

Student ID Last Name First Name
1234567 Doe John
x
x
x
x
x


The x's above indicate blank rows - this is set up for multiple students.

When I do a sort, the blank rows are ignored - how can
I include the blank rows for each student during a sort?
 
A

Andy B

Hi

Excel cannot work out which rows are connected with which others, though.
There has to be some link and if they all have a unique Student ID then that
seemed the obvious one. Even inserting a column containing a 'Year' number
would help, but Excel will still not know enough to be able to keep those
rows together.

--
Andy.


glissonk said:
Andy,

I have tried your suggestion to no avail. What I'm trying to attain is
minimal student entires for data clerks. Each blank row indicates one
school year. Line one would bethe first year. Years 2 - 6 would only
include the raw test scores. I'm trying to sort on the Last Name variable
vs. Student #. Each year the clerks would enter the new raw score w/o a
name. When sorting I'd like to keep all 6 rows together for each student.
 
Top