Hi guys

So I would like to get help on the following problem

I would like to filter one column... 'Column F' to be specific

Then with the corresponding cells in Column R.... I would like to get the maximum values of the visible cells.
I have the following code so far:


Sub MaxTax1()
'
'
'
Dim maximum As Double
Dim IncomeChange As Range
'
'Filters column A

Worksheets("FNB PHI IMPACT").Range("$A$1:$AE$25994").AutoFilter Field:=6, Criteria1:= _
">=70700", Operator:=xlAnd, Criteria2:="<=174550"

'Selects corresponding cells in Row R

'Worksheets("FNB PHI IMPACT").Range("$R$4:$R$25994").Select

'Assigns name to selected array of cells

Set = Worksheets("FNB PHI IMPACT").Range("$R$4:$R$25994").Name

'retrieve maximum value of array

maximum = Application.WorksheetFunction.max(IncomeChange)

'Assign max value to a cell in a different sheet

Worksheets("Impact Analysis").Range("D6").Value = maximum


End Sub

I think my problem is the selection of the rows...includes the unfiltered cells and I only want a range of the filtered/visible values.

I found Range("$R$4:$R$25994").SpecialCells(xlCellTypeVisible).Select ...but I don't know how to use this with my code

Thank you