keeping rows together

  • Thread starter Linda Guyas, Payroll, Kent City Schools
  • Start date
L

Linda Guyas, Payroll, Kent City Schools

I have a large spreadsheet which consists of a name on the first line and
pertinent information regarding that name on the second line. This is
repeated for about 500 names. I would like to sort this, but keep the two
lines for each person together. OR is there a way to move the info on the
2nd line to the first line (the corresponding cells above the 2nd line are
blank)? Obviously, I am looking for a way to do this en masse.

Thanks
 
D

Dave Peterson

I think you'll have to share the layout...

But if your name is in column A of rows 1,3,5,...

you could insert a new column A and put this formula in the new A1:

=B1&"---1"
Then in A2, put this:
=IF(MOD(ROW(),2)=1,B2&"---1",B1&"---2")
and drag down.

You'll end up with the names followed by ---1 or ---2.

I'd select column A and edit|copy, edit|paste special|values

And then sort by the new column A.

And once you're happy, delete that helper column A.
 
M

Martin P

Keep at least one row blank above your first entry.

Suppose your pairs of names and information are in column A in rows (2, 3),
(4, 5),
(6, 7), (8, 9).

Enter the numbers 1 to 8 in cells B2 to B9.

In C2 enter =int((B2+1)/2) and copy to the other cells.

In D2 enter =if(C2=C1,A1,A2) and copy to the other cells.

Sort by column D first and then by column C.
 
Top