Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Automatic cell content deletion

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 100
Default Automatic cell content deletion

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Automatic cell content deletion


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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Automatic cell content deletion


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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 100
Default Automatic cell content deletion

- 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic Moving to the Next Cell 69-er Charts and Charting in Excel 1 August 11th 06 02:55 PM
Using cell content to access another worksheet in same workbook ScubaBum Excel Worksheet Functions 5 June 28th 06 11:11 PM
Conditional Formatting if cell content is a formula oldsambvca Excel Worksheet Functions 2 June 6th 06 10:24 PM
How to click on a cell and have the content of the cell display in a different cell [email protected] Excel Worksheet Functions 0 June 6th 06 03:05 PM
Help with this conditional IF statement C-Dawg Excel Discussion (Misc queries) 3 May 15th 06 06:01 PM


All times are GMT +1. The time now is 05:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"