Does this function ignore invisible cells (autofilter) ?

If not, what could be an alternative?