Forum Discussion

Annette827's avatar
Annette827
Copper Contributor
Apr 26, 2021

Formula for average to eliminate blank cells

Hi - I am trying to get the average appointments per week but there are some weeks where there is no data so it's counting the blanks, for example, there are 18 weeks so far, only 3 weeks has data, week 6 =3 week 8 & 15 = 1 for a total of 5.  When using the formula =average(D1:U1), it returns 3.  What formula do I use to eliminate the blank cells?  Thanks,  Annette

3 Replies

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    Annette827 

    AVERAGE() shall ignore blanks and texts, not sure how did you receive 3. Anyway, to ignore something, e.g. zero

    =AVERAGEIF(D1:U1,"<>0")
    • Annette827's avatar
      Annette827
      Copper Contributor

      Thank  you.  I am getting the same answer - 3.  Maybe it is a weighted average that I am looking for.  Again , there are 18 weeks, 15 of them have nothing in them, one has 3 and two of them have 1 so I can't say the average is 3 per week when most don't have any!  I'm not really sure.  but appreciate you trying to help.  SergeiBaklan 

      • SergeiBaklan's avatar
        SergeiBaklan
        Diamond Contributor

        Annette827 

        Sorry, I can't understand how do you receive 3 as an answer and therefore not sure which result you'd like to have.

        From D1 to U1 we have 18 columns. Sum of values in them is 5. If ignore blank cells we have =5/3, if do not ignore =5/18. In both cases that doesn't return 3.

        If in the middle not blank cells but cells with zero that also doesn't return 3.

Resources