View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
MyVeryOwnSelf MyVeryOwnSelf is offline
external usenet poster
 
Posts: 213
Default Several Formulas

I want to add up a row and average that row but some cells will not
have data and I want a true average.


If it’s row 1, maybe this’ll help:
=SUM(1:1)
=AVERAGE(1:1)
The AVERAGE function ignores cells that are empty or have text in them.


And if this is a continue
spreadsheet I only want to look back 7 days.


Assuming each cell is for one day, put this in G2 and extend it to the
right:
=SUM(A1:G1)
Then put this in G3 and extend it to the right:
=IF(COUNT(A1:G1)=0,"",AVERAGE(A1:G1))

(The "COUNT" test helps if all seven look-back days have no data.)