Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Certain Rows
I would like a VBA code to delete certain rows on a sheet.
If I use xldown it will go to the last row of data in a table. There is more data on the sheet below this but there is a line that is skipped between the target table and the additional data. So, I want to select cell A:1, then do an xldown to get to the last row in the target table. I then want to delete row 3:3 through the desired last row. How? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Certain Rows
dim LastCell as range
with worksheets("sheet1") set lastcell = .range("a1").end(xldown) .range("a3",lastcell).entirerow.delete end with Would be one way. scrabtree23 wrote: I would like a VBA code to delete certain rows on a sheet. If I use xldown it will go to the last row of data in a table. There is more data on the sheet below this but there is a line that is skipped between the target table and the additional data. So, I want to select cell A:1, then do an xldown to get to the last row in the target table. I then want to delete row 3:3 through the desired last row. How? Thanks -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Delete Certain Rows
cLastRow = Cells(Rows.Count,"A").end(xlUp).Row Range("A3:A" & clastrow).entirerow.delete -- HTH RP (remove nothere from the email address if mailing direct) "scrabtree23" wrote in message ... I would like a VBA code to delete certain rows on a sheet. If I use xldown it will go to the last row of data in a table. There is more data on the sheet below this but there is a line that is skipped between the target table and the additional data. So, I want to select cell A:1, then do an xldown to get to the last row in the target table. I then want to delete row 3:3 through the desired last row. How? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hpw do I delete multiple empty rows found between filled rows? | Excel Worksheet Functions | |||
How to Delete empty rows in excel in b/w rows with values | Excel Worksheet Functions | |||
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows | Excel Worksheet Functions | |||
How to delete rows when List toolbar's "delete" isnt highlighted? | Excel Worksheet Functions | |||
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below | Excel Programming |