Quote:
Originally Posted by NoSparks
That didn't go so well. One of the codes never processes what would be the last John Doe's data.
|
Which code was that?!
Yes, poorly tested. Solved (hopefully) by the addition of:
Code:
Set SicHrs = Union(SicHrs, DataBody.Columns(3).Cells(DataBody.Rows.Count).Offset(1))
directly after the existing
Set SicHrs = line.
As to timing, well, I'd expect my offering to be hundreds of times slower - the two codes were designed to handle different scenarios.
In general, I would expect the time taken iterating and testing every cell in a contiguous range as opposed to iterating and not testing every cell in a non-contiguous range such as
AnnHrs to be slower however, how much slower would be dependent on the proportion of cells testing positive for action; If only 3 cells in 30k cells needed action I suspect the non-contiguous range method would be faster than if 10k cells needed action. I haven't tested.