SQUIDD
Well-known Member
- Joined
- Jan 2, 2009
- Messages
- 2,144
- Office Version
- 2019
- 2016
- Platform
- Windows
Hi All
Hope we are all good.
Im trying to work out if i can sumif on visible cells after a filter.
The info is in a table, if that matters.
The below works really well on counta
So Based on that i assumed the below would also work, but no. Have a made a silly mistake, or is it not possible. Should i take a different approach?
Thanks for help in advance.
Dave
Hope we are all good.
Im trying to work out if i can sumif on visible cells after a filter.
The info is in a table, if that matters.
The below works really well on counta
VBA Code:
Set RNG1 = Range("B11:B" & Range("B65536").End(xlUp).Row).SpecialCells(xlCellTypeVisible)
R1 = Application.WorksheetFunction.CountA(RNG1)
So Based on that i assumed the below would also work, but no. Have a made a silly mistake, or is it not possible. Should i take a different approach?
VBA Code:
Set RNG2 = Range("H11:H" & Range("H65536").End(xlUp).Row).SpecialCells(xlCellTypeVisible)
R2 = Application.WorksheetFunction.CountIf(RNG2, "1ST")
Thanks for help in advance.
Dave