View Single Post
 
Old 03-31-2018, 03:53 AM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2010 32bit
Expert
 
Join Date: Apr 2014
Posts: 947
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Quote:
Originally Posted by NoSparks View Post
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.
Reply With Quote