Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This code compares dates in range A5:A500 if any of them are greater
than the value in A1 it deletes that row. It only deletes the first row that meets this criteria, then it stops. If I copy the block of code twice, it works on the first two rows. How can I make this loop? Dim c As Range, compdate As Date compdate = Range("A1").Value If IsDate(compdate) Then For Each c In Range("A5:A500", Range("K65536").End(xlUp)) If IsDate(c.Value) And c.Value compdate Then c.EntireRow.Delete End If Next End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Looping Through Every Instance of Excel | Excel Programming | |||
How do I get one instance of Excel to communicate with another instance? | Excel Programming | |||
Deletes certain columns | Excel Programming | |||
Macro that deletes every third row....+ | Excel Discussion (Misc queries) | |||
Repetative Row Deletes | Excel Discussion (Misc queries) |