![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: Holland
Posts: 2
|
Is there a way to automatically delete rows in a worksheet based upon the entry in the left cell of the row?
Thanks |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Apr 2002
Posts: 210
|
Put the cursor in the top cell of the column and replace the questionmark with your contents you are looking for.
Sub del_rows() While ActiveCell.Value = "?" If ActiveCell.Value = ActiveCell.Offset(1, 0).Value Then ActiveCell.Offset(1, 0).EntireRow.Delete Else ActiveCell.Offset(1, 0).Select End If Wend End Sub |
|
|
|
|
|
#3 | |
|
Board Regular
Join Date: Mar 2002
Posts: 1,288
|
Quote:
Many thanks |
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Apr 2002
Posts: 210
|
Yes.
Change the OFFSET from 1,0 to 0,1 and the entirerow to entirecolumn Jay |
|
|
|
|
|
#5 | |
|
Board Regular
Join Date: Mar 2002
Posts: 1,288
|
Quote:
Can this put in this macro,and how? Many thanks Can |
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Location: Oregon
Posts: 130
|
Hey, not to budge in on this thread, but can you use this to delete, say, three or four rows, including the one in which the specified data is found?
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|