On Dec 8, 3:49*pm, daisy2008 <daisy2...@discussions.microsoft.com>
wrote:
> I need an entire row deleted if column 2 on worksheet 3; date is one year
> later but is less then todays date. *I need this to run when my workbook is
> opened.
>
> Ex
> B4 January 2, 2008
> B5 November 4, 2007
> B6 December 26, 2007
> B7 December 5, 2007
>
> Row 5 *and row 7 are deleted when I open the workbook.
Well the opening the notebook is up to you. However, the code will be
similar to...
for i = 1 to ASMANYROWSASYOUCAREABOUT
theCell = Cells(2,i)
if abs(datediff("yyyy", theCell, date)) > 1 then
theCell.entirerow.delete
end if
next i
Maury
|