I have a sheet which pulls a dynamic set of rows from another sheet via an importrange and a dropdown. I need to place an average in the first empty cell in the same column, this average include all the numbers in the column above it starting at row 5 (without including the cell containing the average itself, as this creates a circular reference error). The number of rows will always change though.
I am fairly comfy with Google Script but still new to it and ideally would like to .setFormula
in the Lastrow+1
based on column index, but I can't seem to get the AVERAGE formula to count the entire column except the cell which contains the average formula.