I have been using this forum with great effect but I have come up against a problem that has beat me for the last few days and I'm hoping you can help!!!
I want to perform a calculation on only the filtered rows of a sheet after using an autofilter. I had planned on using the SpecialCells function to do this but my problem is that I have trouble specifying the range for the caluculations as the number of rows will change depending on the original dataset and/or the criterion I use to filter for. If my sepcified range is too big excel returns #VALUE! for the rows below the bottom of my filtered data. I plan on using the subtotal function to find the average of the results of the calculation in my next step but the #VALUE! is proving problematic. Below is the code I use to filter and after that is the code where I don't know how to correctly specify my range. Please help!!
Now the troublesome one!
Thanks in advance for your help.