View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Conditional Format to Delete Row

Assume the date is held in column F

Dim lastRow as Long, i as Long
lastrow = cells(rows.count,"F").End(xlup).row
for i = lastrow to 2 step -1
if clng(Date) clng(cells(lastrow,"F").Value2) + 45 then
rows(i).Delete
end if
Next

so check the condition. It is extremely difficult to check the color of a
cell colored by conditional formatting.

--
Regards,
Tom Ogilvy

"Teresa C" wrote in message
...
I have a conditional format that turns the cell red if today date is 45

days
greater thatn the date in the cell. If the cell is red, how can I delete

the
entire row automatically?


--
TC