View Single Post
 
Old 08-29-2022, 01:31 PM
p45cal's Avatar
p45cal p45cal is online now Windows 10 Office 2019
Expert
 
Join Date: Apr 2014
Posts: 871
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

maybe:
Code:
=AVERAGE(IF(CHOOSE({1,2,3,4,5},B26,B54,B82,B110,B138)<>0,CHOOSE({1,2,3,4,5},B26,B54,B82,B110,B138)))
or:
Code:
=AVERAGE(IF(INDEX(B:B,{26,54,82,110,138})<>0,INDEX(B:B,{26,54,82,110,138})))
both committed to the sheet with Ctrl+Shift+Enter rather than plain Enter.

or shorter:
Code:
=LET(a,CHOOSE({1,2,3,4,5},B26,B54,B82,B110,B138),AVERAGE(IF(a<>0,a)))
thinking on it…
edit: forget the LET formula, you're using Excel 2010.
Reply With Quote