Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Clear Contents
This seems so simple, but I can't figure it out.
In a large spreadsheet, I would like to ClearContents of the entire row IF the contents in column D of each respective row is greater than the date 1/1/2005. So in row 1, if D1 is 1/1/2005, clear In row 2, if D2 is 1/1/2005, clear...... Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Simple Clear Contents
Dim rng as Range, cell as Range
set rng = Range(Cells(1,4),Cells(rows.count,4).End(xlup)) for each cell in rng if isdate(cell) then if cdate(cell.value) DateSerial(2005,1,1) then cell.EntireRow.ClearContents end if end if Next -- Regards, Tom Ogilvy "Steph" wrote in message ... This seems so simple, but I can't figure it out. In a large spreadsheet, I would like to ClearContents of the entire row IF the contents in column D of each respective row is greater than the date 1/1/2005. So in row 1, if D1 is 1/1/2005, clear In row 2, if D2 is 1/1/2005, clear...... Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Clear Contents | Setting up and Configuration of Excel | |||
Clear Contents | Excel Discussion (Misc queries) | |||
Clear Contents Of Cells Where Value = 0 | Excel Worksheet Functions | |||
Clear clipboard contents | Excel Discussion (Misc queries) | |||
Clear contents if x is not in the row | Excel Programming |