Hi,
I have searched for solutions to this, but can't get my head around them...
I have this code which is returning the value I'm expecting on all my data
CountV1 = Application.WorksheetFunction.SumIf(Columns(DefinedColumn), 1, Columns("C:C"))
This gives me the sum of the data shown in Column C, for items when there is a 1 in the column 'DefinedColumn'
Equally, this is returning the same value:
CountV2 = Application.WorksheetFunction.SumProduct((Columns(DefinedCol)), Columns(("C:C")))
However, I want to run filters on the data and recalculate these values based only on those who fit the criteria of that filter, but my code continues to calculate it all on the total dataset. I think subtotal might be my answer, but can't work out how to adapt my code to fit. Would anyone be so kind as to help!
Cheers!!
Matt
Bookmarks