Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an Excel sheet that has 3 columns. Column 1 is the same throughout -
HQCCA1. What I would like is to start at row 1 and look at Column 3 and if the data in row 1 is XS, then delete the row. Otherwise, go on to the next row and look to see if it is XS, etc through to the end of the sheet. Here is what I wrote and nothing happens (I must admit I tried using a sample to do this.): Sub LoopRange1() x = ActiveCell.Row y = x + 1 Do while Cells(x,1).Value = HQCCA1 If Celss (x,3).Value = "XS" Then Cells(x,1).EntireRow.Delete Else y = y + 1 End If Loop x = x + 1 y = x + 1 End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting Rows - only deletes content | Excel Discussion (Misc queries) | |||
Macro that deletes rows from cell containing End to end of data. | Excel Discussion (Misc queries) | |||
shared file adds or deletes rows | Excel Discussion (Misc queries) | |||
Copy to in Adv filter deletes data in lower rows | Excel Discussion (Misc queries) | |||
Macro that deletes certain rows and not others | Excel Programming |