+ Reply to Thread
Results 1 to 3 of 3

Averaging with empty cells

  1. #1
    Registered User
    Join Date
    06-15-2010
    Location
    Athens, GA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Averaging with empty cells

    Hi, I want to create averages of multiple cell. In some rows, all columns have data and I get my average. In other rows, some columns contain data and others don't. In that case, Excel still gives me the right average and it ignores the empty cells (which is what I want).
    However, when I have a row where all cells are empty, Excel gives me the message #DIV/0!
    But I want the cell to be empty.

    I tried the following formula:
    =IF((B1:E1)="", "", AVERAGE(B1:E1))

    But then I get "#VALUE!"

    Now I wonder where the error is and how I can fix it.

    Best
    Benjamin

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Averaging with empty cells

    Given your use of XL2007

    =IFERROR(AVERAGE(B1:E1),"")

    Else

    =IF(COUNT(B1:E1),AVERAGE(B1:E1),"")

  3. #3
    Registered User
    Join Date
    06-15-2010
    Location
    Athens, GA
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Averaging with empty cells

    Perfect. Thanks

+ 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