Hello all,
I need to average the last value from up to 8 possible subsets each having up to three values (first and/or second value may be missing).
I need to apply this formula to less than 100 rows.
After a few failed solitaire attempts with IF, IFS, CHOOSE and more (see below the shared file), I searched in the site, and found a formula (thanks to @JohnSUN for sharing it) that I was able to transform from column to row.
This is the formula for the first subset (remember that I need to average 8 subsets).
=IFERROR(SUM(OFFSET(A3;0;SUMPRODUCT(MAX(IF(B3:D3="";"";COLUMN(B3:D3))))-1;1;1));"")
Although I don’t understand it thoroughly (I hope some day to know a bit more), it works.
So, my question:
Could it be a shorter or simpler formula to solve this?
Thanks in advance.
Sample file: average of last values if there.ods (35.3 KB)
Here is a screenshot with the working formula tested on 4 rows (the first with 2 subsets).