+ Reply to Thread
Results 1 to 2 of 2

Calculating averages to ignore cells with formulas

  1. #1
    Registered User
    Join Date
    06-19-2008
    Posts
    1

    Calculating averages to ignore cells with formulas

    Hello,

    I have quite a messy proble to sort out, I am currently using the following formula to calculate the average of cells but ignoring cells with zero and blanks, and to return 0 if an error occurs:

    =IF(ISERROR(SUM(J19:J23)/((COUNTA(J19:J23))-(COUNTIF(J19:J23,0)))),0,SUM(J19:J23)/((COUNTA(J19:J23))-(COUNTIF(J19:J23,0))))

    However, the cells used to calculate averages contains a formula (a simpe sum formula), is there a way to change the formula above to ignore the formula as well?

    My aim is that users can put in values that J19:J23 will calulate and an average of J19:J23 calulated.

    Any help appreciated

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    Try this

    =SUM(J19:J23)/MAX(1,COUNT(J19:J23)-COUNTIF(J19:J23,0))
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1