VStack in formula returning an incorrect Empty Array Error?
Effectively what I'm trying to do is an AverageIf formula across worksheets (which obviously doesn't work). I want to take cell C9 in all sheets between InitPage:EndPage where the value is not 0. In the past I did that similar to the formula I have, which is the following -
=LET(targetdata,VSTACK(InitPage:EndPage!C9),AVERAGE(FILTER(targetdata, targetdata="<>0")))
What's odd is this is now returning a #CALC! error saying "Empty Array" where the VSTACK(InitPage:EndPage!C9) portion will result in an error.
However, when I test by writing just =VSTACK(InitPage:EndPage!C9) in a nearby test cell I get
0
.166
.168
0
0
0
0
0
0
0
Ideally in this case the result would be .167 as the average of .166 and .168 is .167, and all 0's would be ignored.
Testing =LET(TargetName,VSTACK(InitPage:EndPage!C9),TargetName) returns the same as the VSTACK alone, which makes me wonder about an issue with the rest of the formula?
Any thoughts as to why VSTACK would be returning empty only inside a formula? Or is something else wrong with my formula?
[link] [comments]
Want to read more?
Check out the full article on the original site