Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding rows within a list


I have a long list with no spaces, all in one column. I am trying to
add 7 blank lines in between each row. What is the easiest way to
achieve this?

Thanks in advance


--
nihad
------------------------------------------------------------------------
nihad's Profile: http://www.excelforum.com/member.php...o&userid=30285
View this thread: http://www.excelforum.com/showthread...hreadid=515389

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Adding rows within a list


Hi

Try the following (I named my list Test)

Dim r As Object
Dim intCount As Integer
intCount = 1

For Each r In Range("Test")
If r.Value = "" Then

Else
r.Offset(1, 0).Select
intCount = 1
Do Until intCount 7
Selection.EntireRow.Insert
intCount = intCount + 1
Loop
End If

Next

--
BadgerM
-----------------------------------------------------------------------
BadgerMK's Profile: http://www.excelforum.com/member.php...fo&userid=3140
View this thread: http://www.excelforum.com/showthread.php?threadid=51538

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Adding rows within a list


Hi nihad

Try this macro

Sub test()
Application.ScreenUpdating = False
Dim R As Long
Dim rng As Range
Set rng = ActiveSheet.UsedRange
For R = rng.Rows.Count To 1 Step -1
rng.Rows(R + 1).Resize(7).EntireRow.insert
Next R
Application.ScreenUpdating = True
End Sub

--
Regards Ron de Bruin
http://www.rondebruin.nl


"nihad" wrote in message
...

I have a long list with no spaces, all in one column. I am trying to
add 7 blank lines in between each row. What is the easiest way to
achieve this?

Thanks in advance


--
nihad
------------------------------------------------------------------------
nihad's Profile: http://www.excelforum.com/member.php...o&userid=30285
View this thread: http://www.excelforum.com/showthread...hreadid=515389



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Adding rows within a list

Sub SpaceSeven()
Dim irow As Long
For irow = Cells(Rows.Count, "A").End(xlUp).Row To 2 Step -1
Rows(irow).Resize(7).Insert shift:=xlDown
Next irow
End Sub


HTH

--
AP

"nihad" a écrit dans le
message de ...

I have a long list with no spaces, all in one column. I am trying to
add 7 blank lines in between each row. What is the easiest way to
achieve this?

Thanks in advance


--
nihad
------------------------------------------------------------------------
nihad's Profile:

http://www.excelforum.com/member.php...o&userid=30285
View this thread: http://www.excelforum.com/showthread...hreadid=515389



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
Automatically extend a list when adding a new data to another list JB Excel Discussion (Misc queries) 0 March 25th 10 02:50 PM
Adding rows based on no of rows specified from a given position nanette Excel Worksheet Functions 1 July 9th 08 02:29 PM
Adding five new rows every 40 rows in a spreadsheet? Olzki Excel Discussion (Misc queries) 8 May 18th 07 02:14 AM
Adding Rows offsets to working rows across two worksheets tom Setting up and Configuration of Excel 3 July 30th 06 07:54 PM
Adding rows to create list from DDE data Simon Excel Programming 2 December 7th 03 11:59 PM


All times are GMT +1. The time now is 01:51 PM.

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"