Private Sub Worksheet_Calculate()
Const WS_RANGE As String = "J21"
Dim iRow As Long
iRow = Me.Range("L" & Rows.Count).End(xlUp).Row
If iRow < 19 Then
iRow = 19
End If
If iRow < 36 Then
If Me.Range(WS_RANGE).Value <> _
Me.Range("L" & Rows.Count).End(xlUp).Value Then
Cells(iRow + 1, "L").Value = Range(WS_RANGE).Value
End If
End If
End Sub
The above code works exactly as I want it to, ie : every time J21 is updated
the result is posted in L21 and if there is already data in that cell it moves down to the next cell L22 and so on down to L36.
The problem is that if the value of cell J21 is repeated consecutively it will
not post the data to the next available cell.
Any help please
Const WS_RANGE As String = "J21"
Dim iRow As Long
iRow = Me.Range("L" & Rows.Count).End(xlUp).Row
If iRow < 19 Then
iRow = 19
End If
If iRow < 36 Then
If Me.Range(WS_RANGE).Value <> _
Me.Range("L" & Rows.Count).End(xlUp).Value Then
Cells(iRow + 1, "L").Value = Range(WS_RANGE).Value
End If
End If
End Sub
The above code works exactly as I want it to, ie : every time J21 is updated
the result is posted in L21 and if there is already data in that cell it moves down to the next cell L22 and so on down to L36.
The problem is that if the value of cell J21 is repeated consecutively it will
not post the data to the next available cell.
Any help please