Ark68
Well-known Member
- Joined
- Mar 23, 2004
- Messages
- 4,616
- Office Version
- 365
- 2016
- Platform
- Windows
I have this line of code that I am trying to use to get the count of filtered rows on my worksheet.
It works, however, the value of f_rowcnt seems to be including the two header rows (rows 1-2) in it's value. This is inaccurate when there are no filtered rows being displayed.
I tried this where lstrow = the value of the last row of data in the worksheet.
as well as this variation
Each resulting in a type mismatch error.
Looking for some assistance to correct this to ensure the correct value for f_rowcnt is calculated.
Code:
f_rowcnt = [subtotal(103,A:A)]
It works, however, the value of f_rowcnt seems to be including the two header rows (rows 1-2) in it's value. This is inaccurate when there are no filtered rows being displayed.
I tried this where lstrow = the value of the last row of data in the worksheet.
Code:
f_rowcnt = [subtotal(103,A3:A &lstrow)]
Code:
f_rowcnt = [subtotal(103,"A3:A" &lstrow)]
Each resulting in a type mismatch error.
Looking for some assistance to correct this to ensure the correct value for f_rowcnt is calculated.