Is there a way to have worksheet delete data that is over 24 hours old?

shawn2209

New Member
Joined
Jul 15, 2017
Messages
18
I have a running inventory sheet going on and I am curious if there is a way I can delete data that is over 24 hours old. I have it to where it will conditionally format the cells over 24 hours but I was curious if it would auto delete as well.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Show us the script that does this:
Your Quote:
"I have it to where it will conditionally format the cells over 24 hours"
 
Upvote 0
If the cells that are conditionally formatted by colour for instance then the rows / ranges that have that colour could be deleted via macro
BUT
there would have to be an action to trigger that macro.
you probably need to provide more info on both the CF and how you want the data removed .....by row / column / individual cell ??
 
Upvote 0
[TABLE="width: 439"]
<tbody>[TR]
[TD]7/24/17[/TD]
[TD]UPC[/TD]
[TD][/TD]
[TD]Tote[/TD]
[TD]Tote Location[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]982134098[/TD]
[TD][/TD]
[TD]T982734[/TD]
[TD]VAS[/TD]
[/TR]
[TR]
[TD]7/24/17[/TD]
[TD]Tote[/TD]
[TD][/TD]
[TD][/TD]
[TD]Location[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]T98273987[/TD]
[TD][/TD]
[TD][/TD]
[TD]VAS[/TD]
[/TR]
[TR]
[TD]7/24/17[/TD]
[TD]Carton[/TD]
[TD][/TD]
[TD][/TD]
[TD]Location[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]C98123947[/TD]
[TD][/TD]
[TD][/TD]
[TD]VAS[/TD]
[/TR]
[TR]
[TD]7/26/17[/TD]
[TD]UPC[/TD]
[TD][/TD]
[TD]Tote[/TD]
[TD]Tote Location[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]67876234123[/TD]
[TD][/TD]
[TD]T987234[/TD]
[TD]VAS[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]876123874619[/TD]
[TD][/TD]
[TD]T987234[/TD]
[TD]VAS[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]98798723412[/TD]
[TD][/TD]
[TD]T987234[/TD]
[TD]VAS[/TD]
[/TR]
[TR]
[TD]7/26/17[/TD]
[TD]UPC[/TD]
[TD][/TD]
[TD]Tote[/TD]
[TD]Tote Location[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]9871234987[/TD]
[TD][/TD]
[TD]T9871234[/TD]
[TD]VAS[/TD]
[/TR]
</tbody><colgroup><col><col><col><col><col></colgroup>[/TABLE]


If cell is between =NOW()-.9999305555 and =NOW()-3 then cell turns red. I only have it to turn the cell with the date red. Is there a way to extend this to the information that falls with the date such as the UPC, Tote, and Tote location? I want it to delete the information that goes with the date as well.
 
Upvote 0
I see no time value on this sheet.

And is the date in column "A"

We maybe could write a script to delete row if date in column "A' is less then Today.

And when you say Delete do you mean clear the cell or Delete the entire row.
 
Upvote 0
The dates in column A is actually =NOW() which has the date and time to it, I have it formatted to just show the date for right now. I want it to delete all the rows associated with that date. If you look at the 4th entry ( the 7/26 entry ) I would want the row with date, UPC, Tote, and Tote Location deleted and the three rows below it deleted. But for the 5th entry I just want the two rows deleted.
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,189
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top