On 2002-03-22 15:45, C. O. Jones wrote:
Here's more efficient code (avoids using a loop) :-
Dim rng As Range
Set rng = Range([C1], [C65536].End(xlUp))
Application.ScreenUpdating = False
rng.EntireColumn.Insert
With rng.Offset(0, -1)
.FormulaR1C1 = "=IF(RC[1]+120<=NOW(),1,"""")"
.SpecialCells(xlCellTypeFormulas, 1).EntireRow.Delete
.EntireColumn.Delete
End With
On 2002-03-22 16:56, Jay Petrulis wrote:
Very nice, but even more efficent
How much more efficient?
On 2002-03-22 18:03, Anonymuos wrote:
On 2002-03-22 16:56, Jay Petrulis wrote:
Very nice, but even more efficent
How much more efficient?
Hi,
I did not test. Probably not much unless the dataset is quite large. I am definitely deferring to the author's expertise.
Both of these two are at the very top of the Excel community and recognized as being there (they're not famous, of course, as they are Excel programmers after all <bg> ).
That's all I can really go on here. Both of these should be lightning quick in most cases.
Stephen hasn't updated his website lately, but it is definitely worth checking out.
http://www.BMSLtd.co.uk
Regards,
Jay
On 2002-03-22 18:34, Ivan F Moala wrote:
Hi Jay
Good work....Not to take away from these 2
great MVP's but the code is efficient BUT
not the fastest....just disabling screen
updating and then enabling it using identical
codes yields 6- 8% diff using 12000 rows of data. Again I'm NOT taking away from you or these 2 great MVP....
Ivan