How do you automatically put spaces between rows in a lengthly w.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a lengthly work sheet and I want to put spaces between every row--how
do I do that?
 
Automatically usually involves VBA coding.

Do you really need the inserted rows? Perhaps you could just change the
height of the rows to look double-spaced?

Here is a macro to do the row inserting.

Sub InsertALTrows()
'David McRitchie, misc 2001-06-30
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual 'pre XL97 xlManual
Dim i As Integer
For i = Selection(Selection.Count).Row To Selection(1).Row + 1 Step -1
Rows(i).EntireRow.Insert
'With Rows(i)
' .RowHeight = 24.25
' End With
Next i
Application.Calculation = xlCalculationAutomatic 'pre XL97
xlAutomatic
Application.ScreenUpdating = True
End Sub


Gord Dibben Excel MVP
 
One way ..

Assume your source data is
in Sheet1, in cols A to C, data from row2 down

In Sheet2
--------
Put in A2:

=IF(MOD(ROWS($A$1:A1)-1,2)=1,"",OFFSET(Sheet1!$A$2,MOD(ROWS($A$1:A1)-1,2)+IN
T((ROWS($A$1:A1)-1)/2),COLUMNS($A$1:A1)-1))

Copy A2 across to C2, fill down until zeros appear, signalling exhaustion of
data from Sheet1

The above will return what you want
(insert alternating blank rows in-between the data from Sheet1)

Do a copy and paste special as values elsewhere as desired
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top