Solved

Insert blank rows in Excel

Posted on 2000-03-14
3
294 Views
Last Modified: 2011-09-20
Hi,

I have a list (in columns A and B) in Excel containing file paths and I need to insert 12 blank rows between each file path. Is there an easy way to do this?

Regards
bernjerg
0
Comment
Question by:bernjerg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Accepted Solution

by:
vboukhar earned 50 total points
ID: 2615253
Quick replay:
Look at sample below - it's VBA program, that adds 12 lines after each non-empty cell in first column.
Sub AddLines()
 i = 1
 k = 0
 Do Until k > 13
   If Not IsEmpty(Cells(i, 1)) Then
     k = 0
     For j = 0 To 11
       Rows(i + 1).Insert xlShiftDown
     Next j
   Else
     k = k + 1
   End If
   i = i + 1
 Loop
End Sub
You have to open VBA editor (alt-F11) and copy-paste code above to Thisworkbook area. Then skip to Excel and run AddLines (alt-F8)

Hope it helps.
0
 

Author Comment

by:bernjerg
ID: 2615287
Thank you!

Exactly what I was looking for!!!

Regards
bernjerg
0
 
LVL 22

Expert Comment

by:ture
ID: 2615310
bernjerg,

Here's a non-VBA step-by-step solution.

1. Insert a new column A
2. Enter 1 in cell A1 and 2 in cell A2
3. Select A1:A2
4. Double-click the fill handle to fill a series as far down as there are values in column B
5. Press Ctrl+C to copy this range.
6. Press Shift+Tab to see activate the last cell in the range

Let's do some manual calculations:
What's the number in that cell? In my case it is 10.
Multiply the number by 13. (That makes 130 in my case)

7. Press Ctrl+G (Go to)
8. Enter the range A1:A130   <--- (the number you calculated above)
9. Click 'OK'
10. Press Ctrl+V to paste into all these cells
11. Select cell A1
12. Press the 'Sort Ascending' toolbar button
13. Delete column A

Ture Magnusson
Karlstad, Sweden
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In case Office 2010 has not been deployed in your environment, this article may be quite useful. In our office, we wanted a way to deploy Microsoft Office Professional Plus 2010 through an automated batch file via logon script. This article is docum…
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question