Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Large spreedsheet that I want to save my start line. step down 1 line and delete 29 line. Step down 1 line and delete 29 lines. Basicaly I want to save every 30th line. Continue this loop until encounter blank line.
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 10/05/2013 14:58, woodworker11 wrote:
Large spreedsheet that I want to save my start line. step down 1 line and delete 29 line. Step down 1 line and delete 29 lines. Basicaly I want to save every 30th line. Continue this loop until encounter blank line. You will find it easier to find the last row and then save the one you want and delete the 29 others working backwards to the first row. That way the loop indexing doesn't renumber under your feet. -- Regards, Martin Brown |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Am Fri, 10 May 2013 14:58:52 +0100 schrieb woodworker11: Large spreedsheet that I want to save my start line. step down 1 line and delete 29 line. Step down 1 line and delete 29 lines. Basicaly I want to save every 30th line. Continue this loop until encounter blank line. you want to save line 30, 60, 90 etc.? then try: Sub Test() Dim i As Long Dim LRow As Long LRow = Cells(Rows.Count, 1).End(xlUp).Row For i = LRow To 2 Step -1 If i Mod 30 < 0 Then Rows(i).Delete End If Next End Sub Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting Lines | Excel Programming | |||
Deleting lines that are not needed. | Excel Programming | |||
Deleting unused lines between used lines? | Setting up and Configuration of Excel | |||
Deleting Lines in Excel | Excel Discussion (Misc queries) | |||
Deleting lines really deletes lines! | Excel Programming |