Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi there!
Over the past few days I've been working on a workflow system in Excel. One of the features that was wanted is a clear down function, which will automatically delete all off the rows with "Y" in Sheets("Work") columns H and I. The only thing is I can't seem to get any form of my code to work... The majority of snippets that require listing values in certain rows I just just the for each cell in rows, if cell.value2 = data then object.additem... etc. Could someone help me with this code and let me know how I can make it workable? Private Sub run_cleardown_Click() Dim data As String data = "Y" For Each cell In Sheets("Work").Range("H:H") If cell.Value2 = data Then EntireRow.Delete cell.Value2 Else End If Next For Each cell In Sheets("Work").Range("I:I") If cell.Value2 = data Then EntireRow.Delete cell.Value2 Else End If End Sub Thanks! Kai |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting Rows based on Column Critieria | Excel Discussion (Misc queries) | |||
Deleting a row of data based upon the value in column D | Excel Programming | |||
Deleting rows based upon the value in column D | Excel Programming | |||
Deleting a row based on the value in column A | Excel Programming | |||
Deleting a column based on a value | Excel Programming |