Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-29-2022, 08:43 AM
Stillgate Stillgate is offline Average a number of Cells excluding 0 Windows 7 32bit Average a number of Cells excluding 0 Office 2010 32bit
Novice
Average a number of Cells excluding 0
 
Join Date: Aug 2018
Posts: 4
Stillgate is on a distinguished road
Default Average a number of Cells excluding 0

=AVERAGE(B26,B54,B82,B110,B138)




I'm doing a average of these cells, but some of them have a value of 0, how do I exclude the zeros? I cant just remove the cell because on different spreadsheets, they will have value.

I cant use the AVERAGEIF, i cant use the range because some of the B cells have other data that dont want to use. I only want these 5 cells.
Reply With Quote
  #2  
Old 08-29-2022, 01:31 PM
p45cal's Avatar
p45cal p45cal is offline Average a number of Cells excluding 0 Windows 10 Average a number of Cells excluding 0 Office 2019
Expert
 
Join Date: Apr 2014
Posts: 866
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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Average a number of Cells excluding 0 Calculate average in a column, but ignore empty cells? alnonymous Word 1 08-09-2022 07:46 PM
Average on conditional formatted cells nadavmaroko Excel 4 02-10-2019 04:13 AM
Average a number of Cells excluding 0 count a number of cells based on the beginning of a order number Kubi Excel 2 08-06-2017 08:54 PM
average formal if cell contains number and text Michael Labuschagne Excel 2 12-08-2016 06:35 AM
Average a number of Cells excluding 0 how to know the number of same cells ? rosalind2 Excel 2 05-16-2014 06:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft