Hi guys, this should be an easy one.
I have an Excel workbook that I need to run a filter with lots of criteria on a number of different sheets and count the results every day. I'm looking to automate it and I'm almost there. Using VBA i've got the filters to select the criteria I need but I can't get it to count the rows that are visible. the code I've tried so far looks like this:
I hope you can see my logic from that. It's also important that the values stay fixed after the count. What I mean is because of the number of filters I need to run I only want to do it once. So the one macro would run like:
filter
count
dump value in cell
filter
count
dump value in other cell
e.t.c
I'm sure its only the one line of code I'm missing.
appreciate your help.
I have an Excel workbook that I need to run a filter with lots of criteria on a number of different sheets and count the results every day. I'm looking to automate it and I'm almost there. Using VBA i've got the filters to select the criteria I need but I can't get it to count the rows that are visible. the code I've tried so far looks like this:
Code:
cells.Range("B2").Value = SpecialCells(xlCellTypeVisible.count
filter
count
dump value in cell
filter
count
dump value in other cell
e.t.c
I'm sure its only the one line of code I'm missing.
appreciate your help.
Comment