Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How do I delete every other line in an Excel document with over 3.
I have a rather large document where I need to delete every other line
beginning with line 8. I am looking for a shortcut rather than manually deleting each line. |
#2
|
|||
|
|||
Hi
this would require VBA or you may try the following procedure in B1 put the following formula: =MOD(ROW(),2) and copy this down for all rows. Now apply an autofilter and filter out every 1 or 0 and afterwards delete the filtered rows -- Regards Frank Kabel Frankfurt, Germany Darren wrote: I have a rather large document where I need to delete every other line beginning with line 8. I am looking for a shortcut rather than manually deleting each line. |
#3
|
|||
|
|||
Try this macro:
Sub DeleteRows() Dim iLastRow As Integer Dim i As Integer Dim iRem As Integer Application.ScreenUpdating = False iLastRow = Cells(Rows.Count, "A").End(xlUp).Row iRem = iLastRow Mod 2 If iRem = 1 Then iLastRow = iLastRow + 1 Else iLastRow = iLastRow End If For i = iLastRow To 8 Step -2 Cells(i, "A").EntireRow.Delete Next i Application.ScreenUpdating = True End Sub --- HTH Jason Atlanta, GA -----Original Message----- I have a rather large document where I need to delete every other line beginning with line 8. I am looking for a shortcut rather than manually deleting each line. . |
#4
|
|||
|
|||
Darren wrote:
I have a rather large document where I need to delete every other line beginning with line 8. I am looking for a shortcut rather than manually deleting each line. If the functions in the freely downloadable file at http://home.pacbell.net are available to your workbook, then assuming your data is on Sheet1 in Columns A:K Array enter into A1:K7 of an empty sheet =Sheet1!A1:K7 and array enter into A8:A[whatever] of that sheet =ArrayAlternates(Sheet1!A8:K[whatever],False) Alan Beban |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Missing values in Excel Line Chart | Charts and Charting in Excel | |||
Excel document properties insert into a cell | Excel Discussion (Misc queries) | |||
Help, insert a word document contents into excel tab? | Excel Discussion (Misc queries) | |||
getting specific info from a word document into excel | Excel Discussion (Misc queries) | |||
Copying an Excel spreadsheet to a Word document | Excel Discussion (Misc queries) |