Welcome to the Board.
Working with disjoint ranges is always tough. There are some tricks though. First, it appears you want to average a set of numbers if they are not zero. But in your example, the first half of your formula is not the same as the second half. In particular, the first half has H15 in it, and the second half has E26. Is this intentional? Assuming that you intend to have the same list in both places, you can try something like this:
=AVERAGE(IFERROR(1/(1/CHOOSE({1,2,3},E16,E26,P16)),""))
and confirm with Control+Shift+Enter. The array list (in red) should go up to the number of values that follow it. So if you have 4 numbers, it would be:
=AVERAGE(IFERROR(1/(1/CHOOSE({1,2,3,4},E16,E26,P16,P26)),""))
Let us know if this works for you.