+ Reply to Thread
Results 1 to 4 of 4

calculating average with blank cells

  1. #1
    Registered User
    Join Date
    08-07-2006
    Posts
    14

    calculating average with blank cells

    Hi
    I have 4 columns with an average function on the bottom, however not all the columns are used all the time, resulting in an error (#DIV/0!). How do I calculate the average only if the cells are used. If I don't used one of the columns I would like it to stay blank or return 0
    thanks
    marvin

  2. #2
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    enter following formula at the bottom of your columns instead of simple AVERAGE function.
    suppose your data is in col A range(A1:A50), you should change this range for each column.

    =IF(ISERROR(AVERAGE(A1:A50)),"",AVERAGE(A1:A50))

    Quote Originally Posted by marvinks
    Hi
    I have 4 columns with an average function on the bottom, however not all the columns are used all the time, resulting in an error (#DIV/0!). How do I calculate the average only if the cells are used. If I don't used one of the columns I would like it to stay blank or return 0
    thanks
    marvin

  3. #3
    Scoops
    Guest

    Re: calculating average with blank cells


    marvinks wrote:
    > Hi
    > I have 4 columns with an average function on the bottom, however not
    > all the columns are used all the time, resulting in an error (#DIV/0!).
    > How do I calculate the average only if the cells are used. If I don't
    > used one of the columns I would like it to stay blank or return 0
    > thanks
    > marvin
    >
    >
    > --
    > marvinks


    Hi marvinks

    Try:

    =IF(ISERR(AVERAGE(A1:A4)),0,AVERAGE(A1:A4))

    Adjust ranges as necessary.

    Regards

    Steve


  4. #4
    Registered User
    Join Date
    08-07-2006
    Posts
    14
    thanks everyone, I'm off to the races

    Marvin

+ 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