When the value changes on Ark2 it is changing as the result of a 'Calculate' not a 'Change', so you would need to use the Worksheet_Calculate event of Ark2, and adapt your code to fit it, as per below. This goes into the Ark2 sheet code:
Private Sub Worksheet_Calculate()
Const IN_CELL As String = "E1"
Const OUT_CELL As String = "E2"
With Me ' the sheet that called the 'Calculate' event
.AutoFilterMode = False ' Remove any old filter
.Cells(1, 1).AutoFilter field:=1, Criteria1:=.Range(IN_CELL).Value ' filter on the INPUT cell
Application.EnableEvents = False
' Set the output cell to the minimum price
.Range(OUT_CELL).Value = WorksheetFunction.Min(.AutoFilter.Range.Cells.SpecialCells(xlCellTypeVisible))
Application.EnableEvents = True
.AutoFilterMode = False ' Remove the filter again
End With
End Sub
Incidently, E1 on the Ark2 sheet could have this forumla:
=CONCATENATE(Ark1!E13," ",Ark1!F13)
Then you wouldn't need the 'helper' cell in column G of Ark1 (and therefore wouldn't need to hide that column
)
Bookmarks