hi andtherus,
hope this solution helps you.
You can have this code under the Sheet2, so when ever a change happenes in the sheet the code is triggred automatically.
Private Sub Worksheet_Change(ByVal Target As Range)
Worksheets("Sheet1").Activate
If WorksheetFunction.CountA(Cells) > 0 Then
Sheet1RowCount = ActiveSheet.UsedRange.Rows.Count
End If
If Sheet1RowCount = 0 Then
Exit Sub
End If
Sheet1Lastdata = Worksheets("Sheet1").Cells(Sheet1RowCount, 1).Value
Worksheets("Sheet2").Activate
If WorksheetFunction.CountA(Cells) > 0 Then
Sheet2RowCount = ActiveSheet.UsedRange.Rows.Count
End If
If Sheet2RowCount = 0 Then
Exit Sub
End If
Sheet2Lastdata = Worksheets("Sheet2").Cells(Sheet2RowCount, 2).Value
Worksheets("Sheet3").Activate
If WorksheetFunction.CountA(Cells) > 0 Then
Sheet3RowCount = Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
Sheet3RowCount = Sheet3RowCount + 1
End If
DivValue = Round(Sheet1Lastdata / Sheet2Lastdata, 0)
Worksheets("Sheet3").Cells(Sheet3RowCount, 1).Value = DivValue
End Sub