Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How can I make Excel add an empty row every filled one in a list .

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!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How can I make Excel add an empty row every filled one in a li

Excellent it works!!

Thank you very much indeed Gord Dibben!

I did not know that something such as VBA existed before today!
Just to add what I did from someone that understand nothing about it. So
that if someone like me needs help, this is probably going to save him/her
time.

I selected the Worksheet I was working on,
I went in Tool, Micro, Visual Basic Editor
Select Insert, Module,
Once the windows opens copy and paste - just - the formula below and press
play on the top row of the Visual Basic for Application Windows.

Thanks!

"Gord Dibben" wrote:

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!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How can I make Excel add an empty row every filled one in a li

I usually add instructions for adding macros to a workbook and running them.

Apologies for my rushing and not including the instructions.

Glad to hear you got it running on your own.


Gord


On Thu, 6 Mar 2008 02:57:00 -0800, Diego C.
wrote:

Excellent it works!!

Thank you very much indeed Gord Dibben!

I did not know that something such as VBA existed before today!
Just to add what I did from someone that understand nothing about it. So
that if someone like me needs help, this is probably going to save him/her
time.

I selected the Worksheet I was working on,
I went in Tool, Micro, Visual Basic Editor
Select Insert, Module,
Once the windows opens copy and paste - just - the formula below and press
play on the top row of the Visual Basic for Application Windows.

Thanks!

"Gord Dibben" wrote:

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!




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count filled data rows until empty Dallman Ross Excel Discussion (Misc queries) 7 May 9th 23 11:43 AM
Macro Request: Fill in empty cells with previous Filled cell in column Artis Excel Worksheet Functions 2 June 25th 07 08:30 PM
How can Excel make a cell empty without making it na()? Bruce Excel Discussion (Misc queries) 1 June 27th 06 09:31 AM
Copy Data From Filled to Empty Cells Sheikh Saadi Excel Discussion (Misc queries) 0 November 10th 05 07:21 PM
How to make empty cells as zero in excel add-ins for SQL Server an Microlong Excel Worksheet Functions 0 January 12th 05 06:31 AM


All times are GMT +1. The time now is 07:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"