I have written an intense macro, that averages a row at a time from a beginning cell to an end cell.
The following line works fine:
However, I am now trying to change this to average only cells with non-zeros.
As many have experienced, when you have a total row with all zeros, it will bug out to only use AverageIF statement, so I was combining IfError statement to combat that.
I don't think there is an error in the statement, so there must be a rule that this doesn't fit or work within the confines of the rules in VBA.
But if typed directly in the cell it works. Recorded a R1C1 macro of this to see if I can convert it to VBA variables:
Recorded:
Trying to input (but VBA tells me error):
ANY IDEAS??? thanks in advance!
Bookmarks