View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default How can I make Excel add an empty row every filled one in a list .

Formulas cannot insert rows.

VBA can insert rows.

Sub InsertRows()
Application.ScreenUpdating = False
Dim numRows As Integer
Dim r As Long
numRows = 1
For r = 1000 To 1 Step -1 'adjust the 1000 to a more meaningful range
ActiveSheet.Rows(r + 1).Resize(numRows).EntireRow.Insert
Next r
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP

On Wed, 5 Mar 2008 14:56:02 -0800, Diego C. <Diego
wrote:

Hi!
I have got a list of dates in a Excel spreadsheet with day and month in the
first column 'A' and the corresponding week day in the second column 'B'. I
obtained this list just by writing the date and week day in the first row and
then drop down the list I needed.

If I want to add row/s between the dates (so each row), since now, I have
been selecting each row manually, then right clicked and selected 'add row'.
Yet, if I have to do this hundreds of time it becomes very annoying and time
consuming.

Anybody knows if there is any formula that can be used to add one or more
rows every filled one?

Thanks!