Here is the code that applies an advanced filter to the column A on the Sheet1 worksheet (List range) by using the range of values on the Sheet2 (criteria range):
You can use the following code to get the visible range of cells:
Excel.Range visibleRange = Excel.Application.ActiveWindow.VisibleRange
Hope this helps.