View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
gjcase
 
Posts: n/a
Default Inserting Multiple Rows


If I understand, you want 16 new blank rows between each of the existing
rows, correct? Assume you have 500 rows of data with a title row at the
top. Your data is in rows 2-501.

1) To do this, insert new columns A & B. Fill col A with an index
number for each row (1-500). Fill col B with 1's for all 500 rows of
data.

2) Copy Cols A & B directly below the existing data (in this example,
into cols A & B of rows 502-1001.) Replace the 1's in Col B of the new
rows with 2's.

3) Repeat step 2 except replacing the 1's with 3's, etc, until you
reach 17. You now have 500 rows of data with 1 thru 500 in col A and 1
in col B, followed by 500 otherwise blanks rows with 1 thru 500 in col
A and 2's in col B, etc, for a total of 9000 rows.

4) Sort the data with the first sort on col A and the second on col B.
This will sort the blank rows numbered 2-17 (i.e., 16 blank rows) up
into the data. You can now delete Col A & B.

If you have to do this often, or to make this a bit easier, in step 2
you can enter 0 in cell B1, then put the formula =B1+1 in cell B2
(next to the index 1 in A2) and =B2 in cell B3, then copy B3 down to
the end of the data. When you copy cells A2:B501 for step 3, the
numbering for col B will be done automatically. It's a good idea to
copy cols A & B and use Paste/Special/Values to replace the formulae
with values before you do the sort, in case you need to re-sort it
later.

Hope this gets you what you need.

---Glenn


--
gjcase
------------------------------------------------------------------------
gjcase's Profile: http://www.excelforum.com/member.php...o&userid=26061
View this thread: http://www.excelforum.com/showthread...hreadid=510102