I have a cell in Excel that gets updated on basis of RAND() function. Each time I update the cell, I want to capture the previous values in a separate column. So that I can compute mean later on.
How to achieve this??
I have a cell in Excel that gets updated on basis of RAND() function. Each time I update the cell, I want to capture the previous values in a separate column. So that I can compute mean later on.
How to achieve this??
Copy below into Worksheet module and change "A1" cell:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not (Intersect(Target, Range("A1")) Is Nothing) Then
i = i + 1
Worksheets("Sheet1").Cells(i, 2).Value = Worksheets("Sheet1").Cells(1, 1).Value
End If
End Sub