Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
In the example below:
Is it possible for the contents of cells A1-B1-C1 and D1 to automatically clear (without deleting the row) when the date in A1 is more than 60 days old? - and - have the contents in the next cells down, move up to the top. In other words, this is a Pass Log and entries over 60 days old are no longer needed. A1, B1, C1 and D1 in the following ,will no longer be an issue in October so those cells would clear in October and the entries currently in A2, B2, C2 and D2 would move up one row and remain there till they were 60 days old..... and so forth down the sheet. A B C D 1 8/31/06 5776 Jones Smith 2 9/22/06 5778 Brown Wallace Thanks Johnnie P.S. - yep, this is that same old sheet with the print button that I bothered everybody with. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this procedure ...
====================================== Sub Naveen() If DateDiff("d", Date, Range("A1")) Then Range("A1:D1").Delete Shift:=xlUp Else MsgBox "Everything OK! Bye!" End If End Sub ====================================== *** Please do rate *** " wrote: In the example below: Is it possible for the contents of cells A1-B1-C1 and D1 to automatically clear (without deleting the row) when the date in A1 is more than 60 days old? - and - have the contents in the next cells down, move up to the top. In other words, this is a Pass Log and entries over 60 days old are no longer needed. A1, B1, C1 and D1 in the following ,will no longer be an issue in October so those cells would clear in October and the entries currently in A2, B2, C2 and D2 would move up one row and remain there till they were 60 days old..... and so forth down the sheet. A B C D 1 8/31/06 5776 Jones Smith 2 9/22/06 5778 Brown Wallace Thanks Johnnie P.S. - yep, this is that same old sheet with the print button that I bothered everybody with. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Naveen wrote: Try this procedure ... ====================================== Sub Naveen() If DateDiff("d", Date, Range("A1")) Then Range("A1:D1").Delete Shift:=xlUp Else MsgBox "Everything OK! Bye!" End If End Sub ====================================== Actually, I don't know exactly how to do that or where to put it. But, wouldn't it have to have a reference as to when to clear the cell? Thanks Johnnie " wrote: In the example below: Is it possible for the contents of cells A1-B1-C1 and D1 to automatically clear (without deleting the row) when the date in A1 is more than 60 days old? - and - have the contents in the next cells down, move up to the top. In other words, this is a Pass Log and entries over 60 days old are no longer needed. A1, B1, C1 and D1 in the following ,will no longer be an issue in October so those cells would clear in October and the entries currently in A2, B2, C2 and D2 would move up one row and remain there till they were 60 days old..... and so forth down the sheet. A B C D 1 8/31/06 5776 Jones Smith 2 9/22/06 5778 Brown Wallace Thanks Johnnie P.S. - yep, this is that same old sheet with the print button that I bothered everybody with. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Naveen wrote: Try this procedure ... ====================================== Sub Naveen() If DateDiff("d", Date, Range("A1")) Then Range("A1:D1").Delete Shift:=xlUp Else MsgBox "Everything OK! Bye!" End If End Sub ====================================== Actually, I don't know exactly how to do that or where to put it. Little to no knowledge of VB. Thanks Johnnie (newbie) " wrote: In the example below: Is it possible for the contents of cells A1-B1-C1 and D1 to automatically clear (without deleting the row) when the date in A1 is more than 60 days old? - and - have the contents in the next cells down, move up to the top. In other words, this is a Pass Log and entries over 60 days old are no longer needed. A1, B1, C1 and D1 in the following ,will no longer be an issue in October so those cells would clear in October and the entries currently in A2, B2, C2 and D2 would move up one row and remain there till they were 60 days old..... and so forth down the sheet. A B C D 1 8/31/06 5776 Jones Smith 2 9/22/06 5778 Brown Wallace Thanks Johnnie P.S. - yep, this is that same old sheet with the print button that I bothered everybody with. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
- Click on "Tools" menu
- Click on "Macro" sub-menu - Click on "Visual Basic Editor" menu item (or you can just press ALT-F11) - On the "project explorer window" in "Visual Basic Editor" find your excel file and right click on it. - Select insert "Modules" - Now paste my procedure. - Come back to Excel - Again goto "Tools-Macro-Macros" - Select procedure name and click run Bye *** please do rate *** " wrote: In the example below: Is it possible for the contents of cells A1-B1-C1 and D1 to automatically clear (without deleting the row) when the date in A1 is more than 60 days old? - and - have the contents in the next cells down, move up to the top. In other words, this is a Pass Log and entries over 60 days old are no longer needed. A1, B1, C1 and D1 in the following ,will no longer be an issue in October so those cells would clear in October and the entries currently in A2, B2, C2 and D2 would move up one row and remain there till they were 60 days old..... and so forth down the sheet. A B C D 1 8/31/06 5776 Jones Smith 2 9/22/06 5778 Brown Wallace Thanks Johnnie P.S. - yep, this is that same old sheet with the print button that I bothered everybody with. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automatic Moving to the Next Cell | Charts and Charting in Excel | |||
Using cell content to access another worksheet in same workbook | Excel Worksheet Functions | |||
Conditional Formatting if cell content is a formula | Excel Worksheet Functions | |||
How to click on a cell and have the content of the cell display in a different cell | Excel Worksheet Functions | |||
Help with this conditional IF statement | Excel Discussion (Misc queries) |