Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I got his code and it works fine but wondering if it can be modified to
delete not only rows that have "TRUE" in column in A but other 3 or 4 different calues in column B... Sub UPDATE_TENURE() Dim MyRange, MyRange1 As Range Dim LastRow As Long Set Sht = Sheets("Agent Tenure") LastRow = Sht.Cells(Rows.Count, "A").End(xlUp).Row Set MyRange = Sht.Range("A1:A" & LastRow) For Each c In MyRange If UCase(c.Value) = "TRUE" Then If MyRange1 Is Nothing Then Set MyRange1 = c.EntireRow Else Set MyRange1 = Union(MyRange1, c.EntireRow) End If End If Next If Not MyRange1 Is Nothing Then MyRange1.Delete End If End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help Modifying Macro - Merge multiple sheets based on a condition | Excel Programming | |||
Macro to delete rows based on a condition | Excel Worksheet Functions | |||
macro to delete rows on condition | Excel Programming | |||
how do I delete all rows that match a condition? | Excel Worksheet Functions | |||
delete rows with certain condition | Excel Programming |