Hi

I have a formula to count the number of weekdays between two dates, however, when I change the last date by filter, ex excluding the last month, it still takes into account the hidden cells, how do I change the lookup to exlude hidden cells such that it only takes the last visible cell into the caclulation?
=NETWORKDAYS(B15,(LOOKUP(2,1/(B:B<>""),B:B)))