Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help on deleting several rows at once
I wish to delete multiple, non continuous rows at once. When such rows are
selected, it says "This operation can not be performed on multiple objects". The rows in question run into hundreds, say I would like to delete all even rows, or every third row from ROW 1 onwards can you please help |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
help on deleting several rows at once
Hi
do you have merged cells in your selected range. Also you may post the code you have tried "hsg" wrote: I wish to delete multiple, non continuous rows at once. When such rows are selected, it says "This operation can not be performed on multiple objects". The rows in question run into hundreds, say I would like to delete all even rows, or every third row from ROW 1 onwards can you please help |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
help on deleting several rows at once
Actually I want to delete, in present case, all even numbered rows, and there
are no merged cells, and I have not tried any code so far. I selected alternate rows, and deleted by right clicking and "delete", but since the rows number into hundreds or so, I wanted to know how can this be done using a macro, or otherwise also. harsh "Frank Kabel" wrote: Hi do you have merged cells in your selected range. Also you may post the code you have tried "hsg" wrote: I wish to delete multiple, non continuous rows at once. When such rows are selected, it says "This operation can not be performed on multiple objects". The rows in question run into hundreds, say I would like to delete all even rows, or every third row from ROW 1 onwards can you please help |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
help on deleting several rows at once
Below code will delete Odd rows, in the used range:- Sub delRowOdd() Dim i As Long, rDelRow As Range, totRows As Long With Worksheets("Sheet1") totRows = .UsedRange.Cells.Rows.Count Set rDelRow = .Rows(1) For i = 1 To totRows Step 2 Set rDelRow = Union(rDelRow, .Rows(i)) Next i End With rDelRow.EntireRow.Delete End Sub *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
help on deleting several rows at once
Manually:
Insert a new column (column A). Put X in A1 Put Y in A2 Select A1:A2 and rightclick and drag down. let go and choose copy. Apply Data|filter|autofilter and show only the rows you want to delete. select those visible rows and rightclick|delete|entirerow Remove the autofilter and delete your helper column. hsg wrote: I wish to delete multiple, non continuous rows at once. When such rows are selected, it says "This operation can not be performed on multiple objects". The rows in question run into hundreds, say I would like to delete all even rows, or every third row from ROW 1 onwards can you please help -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro for deleting rows and serialising the remaing rows | Links and Linking in Excel | |||
Macro for deleting rows and serialising the remaing rows | Setting up and Configuration of Excel | |||
Macro for deleting rows and serialising the remaing rows | Excel Worksheet Functions | |||
Help!! I have problem deleting 2500 rows of filtered rows!!!! | Excel Discussion (Misc queries) | |||
deleting hidden rows so i can print only the rows showing?????? | Excel Worksheet Functions |