Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete rows with header, excluding 1st row
Headers are repeated several times between rows A1:A1000.
Need to delete all rows where header "DAY" is in column A, except for the first instance (A1). |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
delete rows with header, excluding 1st row
try code like the following:
Sub AAA() Dim N As Long With ActiveSheet N = .Cells(.Rows.Count, "A").End(xlUp).Row Do Until N = 1 If StrComp(.Cells(N, "A"), "DAY", vbTextCompare) = 0 Then .Rows(N).Delete End If N = N - 1 Loop End With End Sub Cordially, Chip Pearson Microsoft Most Valuable Professional, Excel, 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com On Tue, 30 Mar 2010 10:25:28 -0700 (PDT), "J.W. Aldridge" wrote: Headers are repeated several times between rows A1:A1000. Need to delete all rows where header "DAY" is in column A, except for the first instance (A1). |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Countif excluding hidden rows | Excel Worksheet Functions | |||
Excluding Hidden Rows from calculations | Excel Worksheet Functions | |||
ListBox with header row, delete row, protect header row | Excel Programming | |||
How do i split my column excluding the header into three sections | Excel Discussion (Misc queries) | |||
Excluding certain rows from Sort | Excel Programming |