I use some VBA code for advanced AutoFiltering (i.e. a filter can be applied to any cells that match active cell in a column, etc.)
I use some UDFs that'll generate specific outputs based on the value of a referenced cell.

Independently, both the VBA and the UDF codes work.

However, if the UDF references data in the Autofilter range, the output(s) will #VALUE when running the VBA*

Then:
If I go into each cell and hit enter (rerun the function), the #VALUE of that cell is corrected.
If I adjust the Autofilter using regular old Excel (i.e. just turning on/off any criteria), all of the #VALUES are corrected.

*In debug mode, this is an example of the code that causes the #VALUEs.
Please Login or Register  to view this content.

Any thoughts on why this might be happening?

Thanks!