Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the len function will differentiate them then sure
lastrow = cells(rows.count,1).end(xlup).row for i = lastrow to 1 step -1 if len(cells(i,1)) < 10 then cells(i,1).EntireRow.Delete end if Next if the number of cells filled in that row is the criteria lastrow = cells(rows.count,1).end(xlup).row for i = lastrow to 1 step -1 if application.countA(rows(i)) < 10 then cells(i,1).EntireRow.Delete end if Next Adjust the criteria in the IF statement to fit your situation. -- Regards, Tom Ogilvy "David Bateman" wrote in message ... I import a large amount of data into excel unfortunately there are headers or footers interspersed with the data. Sometimes the headers take up 10 rows and sometimes it takes up 11. Would it be best to identify through the len function which rows to delete? How would I programmatically remove them? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting rows programmatically | Excel Worksheet Functions | |||
programmatically fix no. of rows and columns | Excel Programming | |||
Hiding rows programmatically | Excel Programming | |||
Selecting Rows Programmatically | Excel Programming | |||
Sorting rows programmatically | Excel Programming |