0
I am trying to go through a list of filtered results in VBA and found the following syntax, however when running appears "Incompatible types"
loc13 = Workbooks("Histórico 2013-2021.xlsx").Worksheets("Memória Intervenções").AutoFilter.Range.Columns(17).Rows(j).SpecialCells(xlCellTypeVisible).Value
Debug.Print (loc13)
Save it, my dear! I’d say you’re using the
AutoFilter
wrong... You could say what you intend to put in the variableloc13
? Also, what is the type of the variable and what appears if you put aDebug.Print Workbooks("Histórico 2013-2021.xlsx").Worksheets("Memória Intervenções").AutoFilter.Range.Columns(17).Rows(j).SpecialCells(xlCellTypeVisible).Address
?– César Rodriguez
In the variable loc13 I want to put the filtered value and go through with a FOR. When debugging this line of code, it returns me the first visible value (which was expected), however when continuing for, it does not update the values of the next lines. Just give me the first value
– Iago Gonalves