I would like to do averaging across sheets. Assume that I have sheets named A,B,C and I want to average cell B12 over all sheets. I managed to find the formula (which works):
=AVERAGE(A:C!B12)
Now I would like to do it parametric, ie I want to put the name of the last sheet in cell B2 so when I add another sheet (sheet D), the only thing I need to do is to change B2 (because the averaging should now go from sheets A to D).
I've tried to use the INDIRECT function but for some reason it does not work.
=AVERAGE(INDIRECT("'A:"&$B$2&"'!"&B12))
Any ideas?
Thanks in advance!
Typically you would put a blank worksheet named start before worksheet A and a blank worksheet named end after worksheet C.
=AVERAGE(start:end!B12)
Inserting a worksheet anywhere between start and end will adjust the result.
You can hide the blank worksheets but that can make it difficult to insert a new worksheet at the position before worksheet A or after worksheet C.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.