I have an excel sheet with a B column with more than 100 rows that are dynamic from a RTD link.
This RTD link updates every second and the values keeps increasing until at given moment it changes to zero. I just need to store at column C the last value before it changes to zero.
I tried by sub (code below), but the loop I created is crashing Excel.
I think the best way to do it is with VBA function, I tried but without success. Someone can think in a function?
Private Sub Worksheet_Calculate()
Dim rng As Range
Set rng = Me.Range("B3:B7")
For i = 3 To 7
If Range("B" & i) > Range("C" & i) Then
Range("C" & i) = Range("B" & i)
End If
Next i
End Sub