Put this in the Workbook module:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Sh.Name = "FinStmt" And Target.Address = "$B$1" Or Sh.Name = "Input" Then
With Application
.EnableEvents = False
Call UpdateSummary
.EnableEvents = True
End With
End If
End Sub
Private Sub UpdateSummary()
Dim r As Range
Dim i As Integer
i = Application.Match( _
Worksheets("FinStmt").Range("B1").Value, _
Worksheets("Working").ListObjects("Table3").ListColumns("SCENARIO").DataBodyRange, _
0)
With Worksheets("FinStmt")
Set r = .Range("F4", .Cells(Rows.Count, "F").End(xlUp))
End With
Worksheets("ExecSumm").Cells(3, 1 + i).Resize(r.Rows.Count).Value = r.Value
End Sub
Of course, the Exec Summary will only be updated for the currently selected scenario, regardless of which input variables are changed - so if you changed a selling price for "Best Case", this would only be reflected in the Exec Summary if "Best Case" is selected on sheet [FinStmt].
I'm not convinced any of this is the best approach...
Bookmarks