Hi,
if I want to find the max of 5 cells (every cell is filled every sec) from A1 to A65536
I write
The only solution I found is to put a value (ex. 0 ) inside the first 5 cells.
What if I don't want to initialize the first 5 cell?
Count goes from 1 to infinite and updates every 1 sec
MaxMin is the sheet where I save the Max and the Min every 5 sec from Sheet2
Sheet2 is updated every 1 sec from A1 to A65536
if I want to find the max of 5 cells (every cell is filled every sec) from A1 to A65536
I write
but if the first 5 cells are empty I received an error.If (myCount Mod 5 = 0) Then
With Worksheets("Sheet2")
Worksheets("MaxMin").Range("B65536").End(xlUp).Offset(1, 0) = Application.WorksheetFunction.Max(.Range(.Range("A65536").End(xlUp), .Range("A65536").End(xlUp).Offset(-5)))
Worksheets("MaxMin").Range("C65536").End(xlUp).Offset(1, 0) = Application.WorksheetFunction.Min(.Range(.Range("A65536").End(xlUp), .Range("A65536").End(xlUp).Offset(-5)))
End With
End If
The only solution I found is to put a value (ex. 0 ) inside the first 5 cells.
What if I don't want to initialize the first 5 cell?
Count goes from 1 to infinite and updates every 1 sec
MaxMin is the sheet where I save the Max and the Min every 5 sec from Sheet2
Sheet2 is updated every 1 sec from A1 to A65536
Last edited: