What I mentioned earlier would probably work as a worksheet fuction.
Something like:
=IF(SUBTOTAL(103,$A$1:$A & [current row - 1])=0,$A$1,$A1)
But, this would cause massive slowdowns with rows in excess of 10,000,
and I eventually want to run this process on 100,000+ rows. My idea is
to use VBA to calculate this subtotal at the end of my userform macro
on the filtered data. This would then populate the results into an
additional column inside of my table. This means that any calculations
I would do on the filtered data would act as they do now, because I'm
only referencing an additional cell per row, instead of an entire
array per row (as a worksheet function would do).
I think an alternative might be to cycle through all of my rows and
find the first that isn't hidden, but I haven't tried that yet.
This is the best answer I've come up with so far to solve my problem,
and the only drawback is that my inputs are still hidden when
everything is filtered (but that can easily be fixed by moving them
somewhere else).
BTW, a word to the wise: apparently hitting ESC inside of a textbox
online deletes all text typed, as I (unfortunately) just found out.
Thanks for all of the help.
|