+ Reply to Thread
Results 1 to 6 of 6

Average only cells that contain numbers

  1. #1
    April
    Guest

    Average only cells that contain numbers

    I have set up a table in which I need to average only the cells that contain
    numbers and I need to ignore cells that contain #DIV/0 from a formula that I
    have entered without changing them to zero. I still need the formula for the
    other cells. I need to setup a formula that is consistent for workbook so I
    will need to be able to include the #DIV/0 cells in my formula but still
    average only the cells that have a number in them. I have tried the Count
    function but I need it to recognize the numbers and average them while
    ignoring #DIV/0.

  2. #2
    Biff
    Guest

    Re: Average only cells that contain numbers

    Hi!

    Try this:

    Entered as an array using the key combo of CTRL,SHIFT,ENTER:

    =AVERAGE(IF(ISNUMBER(A1:J1),A1:J1))

    Biff

    "April" <[email protected]> wrote in message
    news:[email protected]...
    >I have set up a table in which I need to average only the cells that
    >contain
    > numbers and I need to ignore cells that contain #DIV/0 from a formula that
    > I
    > have entered without changing them to zero. I still need the formula for
    > the
    > other cells. I need to setup a formula that is consistent for workbook so
    > I
    > will need to be able to include the #DIV/0 cells in my formula but still
    > average only the cells that have a number in them. I have tried the Count
    > function but I need it to recognize the numbers and average them while
    > ignoring #DIV/0.




  3. #3
    Ashish Mathur
    Guest

    RE: Average only cells that contain numbers

    Hi,

    Another array formula (Ctrl+Shift+Enter) for achieving this result is:

    =AVERAGE(IF(NOT(ISERROR(range)),range))

    Regards

    Ashish Mathur

    "April" wrote:

    > I have set up a table in which I need to average only the cells that contain
    > numbers and I need to ignore cells that contain #DIV/0 from a formula that I
    > have entered without changing them to zero. I still need the formula for the
    > other cells. I need to setup a formula that is consistent for workbook so I
    > will need to be able to include the #DIV/0 cells in my formula but still
    > average only the cells that have a number in them. I have tried the Count
    > function but I need it to recognize the numbers and average them while
    > ignoring #DIV/0.


  4. #4
    Registered User
    Join Date
    03-17-2014
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Average only cells that contain numbers

    Those answers didn't work for me but I found something that did. My table is set up with either a number or "---" and I wanted to average just the ones with numbers. I used:

    =IF(NOT(ISTEXT(range)),AVERAGE(range))

    It may also be worth mentioning that some of my numbers were formatted as text, as numbers and as general, so that doesn't seem to make a difference. I did do it again averaging percentages in the same way but needed to have those cells and the formula cell formatted as percentages for it to work correctly.

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Average only cells that contain numbers

    AVERAGE function ignores text anyway so if you have just numbers and --- you can use a simple average like

    =AVERAGE(range)
    Audere est facere

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Average only cells that contain numbers

    It's only appropriate that I reply to this thread!

    If some of your "numbers" are formatted as text then a simple AVERAGE won't work.

    Are there any empty cells in the range?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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