Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]() i have a long list all in one column. the data in the first fifteen (1 thrue 15) is related and must be kept in sequence. the first fifteen cells repeats with changes in its data for the next fifteen (16 thrue 30) and also must be kept in sequence. this repeats over and over for a list of about 4000 cells. what i need to do is this: i need to insert an empty cell betwwn each group of fifteen cells.-to seperate them. between 15 & 16, 30 & 31 etc without disturbing the continuity of each 15 cell grouping.. thankyou so much. -- ROLG ------------------------------------------------------------------------ ROLG's Profile: http://www.excelforum.com/member.php...o&userid=16066 View this thread: http://www.excelforum.com/showthread...hreadid=320559 |
#2
![]() |
|||
|
|||
![]()
This worked ok for me:
Option Explicit Sub testme() Dim iCtr As Long Dim LastRow As Long Dim myRng As Range With ActiveSheet LastRow = .Cells.SpecialCells(xlCellTypeLastCell).Row Set myRng = Nothing For iCtr = 16 To LastRow Step 15 If myRng Is Nothing Then Set myRng = .Cells(iCtr, "A") Else Set myRng = Union(.Cells(iCtr, "A"), myRng) End If Next iCtr End With If myRng Is Nothing Then 'do nothing Else myRng.EntireRow.Insert End If End Sub ROLG wrote: i have a long list all in one column. the data in the first fifteen (1 thrue 15) is related and must be kept in sequence. the first fifteen cells repeats with changes in its data for the next fifteen (16 thrue 30) and also must be kept in sequence. this repeats over and over for a list of about 4000 cells. what i need to do is this: i need to insert an empty cell betwwn each group of fifteen cells.-to seperate them. between 15 & 16, 30 & 31 etc without disturbing the continuity of each 15 cell grouping.. thankyou so much. -- ROLG ------------------------------------------------------------------------ ROLG's Profile: http://www.excelforum.com/member.php...o&userid=16066 View this thread: http://www.excelforum.com/showthread...hreadid=320559 -- Dave Peterson |
#3
![]() |
|||
|
|||
![]() thankyou for your very appreciated help. -- ROLG ------------------------------------------------------------------------ ROLG's Profile: http://www.excelforum.com/member.php...o&userid=16066 View this thread: http://www.excelforum.com/showthread...hreadid=320559 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can't move a named cell without breaking a hyperlink to that cell | Links and Linking in Excel | |||
Display cell value on a chart. | Charts and Charting in Excel | |||
How do I set a cell to "Empty" so that it does not display in a ch | Charts and Charting in Excel | |||
make a cell empty based on condition | Charts and Charting in Excel | |||
Transferring cell content between workbooks using cell references | Excel Discussion (Misc queries) |