![]() |
Purge Data Based on Cell Color and Time
I am trying find a way to purge data after a few hours based on if certain
cells have a fill color of green. Excel may not be the best application to use to accomplish this task. |
Purge Data Based on Cell Color and Time
Hi Todd
EasyFilter beta 2.1 can filter on colors (not CF) You can delete hide copy and ...... http://www.rondebruin.nl/easyfilter.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Todd" wrote in message ... I am trying find a way to purge data after a few hours based on if certain cells have a fill color of green. Excel may not be the best application to use to accomplish this task. |
Purge Data Based on Cell Color and Time
Do you mean you want to clear the cells, say 10 hours from now, if they are
say red? If so, you are best to write a macro testing teh colour and clearing the cells, and the use Ontime to launch that after your specified time interval. -- HTH RP (remove nothere from the email address if mailing direct) "Todd" wrote in message ... I am trying find a way to purge data after a few hours based on if certain cells have a fill color of green. Excel may not be the best application to use to accomplish this task. |
Purge Data Based on Cell Color and Time
Yes, once the cells turn green (signifies as ready) then, say 10 hours from
now the cells can be cleared (or deleted since we want data below to move to the top of the list). I'm not real familiar with writing macros. Do you know where I can find some sample code to make this happen? Thank you, Todd "Bob Phillips" wrote: Do you mean you want to clear the cells, say 10 hours from now, if they are say red? If so, you are best to write a macro testing teh colour and clearing the cells, and the use Ontime to launch that after your specified time interval. -- HTH RP (remove nothere from the email address if mailing direct) "Todd" wrote in message ... I am trying find a way to purge data after a few hours based on if certain cells have a fill color of green. Excel may not be the best application to use to accomplish this task. |
Purge Data Based on Cell Color and Time
Here is a sample sub
Sub ClearColours() Dim cell as Range For Each cell In Thisworkbook.Worksheets("Sheet1").UsedRange If cel.Interior.Colorindex = 10 Then cell.delete xlShiftUp End If Next cell End Sub It would get fired like so Ontime Now + TimeSerial(10,0,0),"ClearColour" I have no idea what turns the cell green so I cannot advice as to how the OnTime command would be executed. -- HTH RP (remove nothere from the email address if mailing direct) "Todd" wrote in message ... Yes, once the cells turn green (signifies as ready) then, say 10 hours from now the cells can be cleared (or deleted since we want data below to move to the top of the list). I'm not real familiar with writing macros. Do you know where I can find some sample code to make this happen? Thank you, Todd "Bob Phillips" wrote: Do you mean you want to clear the cells, say 10 hours from now, if they are say red? If so, you are best to write a macro testing teh colour and clearing the cells, and the use Ontime to launch that after your specified time interval. -- HTH RP (remove nothere from the email address if mailing direct) "Todd" wrote in message ... I am trying find a way to purge data after a few hours based on if certain cells have a fill color of green. Excel may not be the best application to use to accomplish this task. |
Purge Data Based on Cell Color and Time
Bob, you got me started and really helped to get me in the right direction.
I believe I have it working the way I envisioned (with the exception of the time part - I have not started on that yet). Thanks again, Todd "Bob Phillips" wrote: Here is a sample sub Sub ClearColours() Dim cell as Range For Each cell In Thisworkbook.Worksheets("Sheet1").UsedRange If cel.Interior.Colorindex = 10 Then cell.delete xlShiftUp End If Next cell End Sub It would get fired like so Ontime Now + TimeSerial(10,0,0),"ClearColour" I have no idea what turns the cell green so I cannot advice as to how the OnTime command would be executed. -- HTH RP (remove nothere from the email address if mailing direct) "Todd" wrote in message ... Yes, once the cells turn green (signifies as ready) then, say 10 hours from now the cells can be cleared (or deleted since we want data below to move to the top of the list). I'm not real familiar with writing macros. Do you know where I can find some sample code to make this happen? Thank you, Todd "Bob Phillips" wrote: Do you mean you want to clear the cells, say 10 hours from now, if they are say red? If so, you are best to write a macro testing teh colour and clearing the cells, and the use Ontime to launch that after your specified time interval. -- HTH RP (remove nothere from the email address if mailing direct) "Todd" wrote in message ... I am trying find a way to purge data after a few hours based on if certain cells have a fill color of green. Excel may not be the best application to use to accomplish this task. |
All times are GMT +1. The time now is 05:10 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com