Originally Posted by
BuZZarD73
After studying your problem above, I think it's complicated greatly by the way the data is handled, due to disconnects and what are essentially reconnects being recorded (or assumed) in the same column.
The logic of calculating what you need from a single column is too complex.
If I'm reading it right, then you first need a formula to calculate the trigger point which would be when the device was last reported NOT offline which would be a missing entry of a 10 minute interval after a previous recorded disconnect instance - so find the first disconnect time that was >=11 minutes after the last recorded entry.
This would provide you with your first operand and then you have to use further logic to ascertain the next gap in the 10 minute polling interval as the termination point to provide your second operand for what would essentially be a sum.
I think you need to consider putting a column in that shows the time of the reconnect - then you can use a much more workable calculation - ideally, there will be a condition in your macro that states that if there is no entry in a polling interval, then put an entry in another column labelled 'reconnect'.
These are my thoughts anyway. Although it doesn't solve the problem, hope it helps with the approach.
Bookmarks