Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert Blank row in between each row of data

Status
Not open for further replies.

palgya

Technical User
Sep 3, 2002
34
0
0
US
I import a .csv of about 150 lines and have a need to add additional data to it. How can I insert blank rows in between each row of data?
Thanks in Advance
 
This might be a good time to learn VBA, but since this is not the VBA forum, try this:

1. Using the next available column beside your data, number the rows from 1 to 150. (E.g. use formula in X3: =X2+1 and copy down all rows. Then copy and paste/special/values.)

2. Copy the cells with the numbers to the next row below the last value. You now have 300 rows numbered.

3. Sort the data with the new column as primary and some other column as secondary. Use a column that won't have blanks in it. (If that is not possible, use another working column and put something in each of the first 150 rows then use that as the secondary sort column.)

4. Delete the working column(s).

 
palgya,

If you want to use VBA, something like this should work. It may need to be tweaked depending on what your data looks like.

Code:
Sub AddSpaces()
Application.ScreenUpdating = False
Range("a65536").End(xlUp).Select

Do
Selection.EntireRow.Insert
ActiveCell.Offset(-1).Select
Loop Until ActiveCell.Row = 1

Application.ScreenUpdating = True
End Sub

[tt]_____
-John
[/tt]Help us help you. Please read FAQ181-2886 before posting.
 
palgya,

FYI,

Under most conditions I would recommend against inserting empty rows in a table.

If you want to ADD data that would be interleaved, structure your table so that data can be ADDED at the bottom and SORTED into place.

Skip,
[sub]
[glasses] [red]Be advised:[/red] When you ignite a firecracker in a bowl of vanilla, chocolate & strawberry ice cream, you get...
Neopolitan Blownapart! [tongue][/sub]

 
Thanks all for your help. I know that it's not usually a good practice to add blank rows but this import is just a listing of goods ordered. I don't need to go back and report on the data, I just want for my own records.
 


Is this a VISUAL thing? Maybe changing the row height?

Skip,
[sub]
[glasses] [red]Be advised:[/red] When you ignite a firecracker in a bowl of vanilla, chocolate & strawberry ice cream, you get...
Neopolitan Blownapart! [tongue][/sub]

 
Skip,
No I just make my annotations on it for my own use. I used anotherhiggins snip and it works for what I need.
Thanks
Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top