Average formula Counting zero's How do I get just the numers counted.

  • Thread starter Canadahockeydude
  • Start date
C

Canadahockeydude

Spreadsheet is created for a layover from other sources, therefore,
zeros will be present when data is laid on top of master spreadsheet.
Also, want to show no values by using a "-" when no numbers present
for easy recognition. Current formula is =IF(SUM(D9:GU9)=0,"-",
(AVERAGE(D9:GU9))) but if two numbers and a zero are present it
averages by three. Can anyone HELP?????
 
T

T. Valko

Can there be any negative numbers in your range?

Assuming not, try this:

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=IF(SUM(D9:GU9),AVERAGE(IF(D9:GU9>0,D9:GU9)),"-")

Biff
 
G

Guest

Hi

You could replace the (AVERAGE(D9:GU9) bit with
=SUM(D9:GU9)/COUNTIF(D9:GU9,">0")

HTH
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top