+ Reply to Thread
Results 1 to 7 of 7

average formula without using cells that have "empty" formulas

  1. #1
    Registered User
    Join Date
    10-24-2012
    Location
    Hawaii
    MS-Off Ver
    Excel for Mac 2011
    Posts
    3

    average formula without using cells that have "empty" formulas

    Sorry for my lack of correct terminology and perhaps confusing question. I'm very new to excel.

    In the N column, I have a formula to calculate the average of cells H11-M11. In cells K11, L11, and M11, I have formulas that pull data from other excel sheets. Currently, no data has been inputted. Is there a formula that I can use that will not include the “empty” formulas in the overall average from cells H11-M11 but will include the formula cells once data has been inputted?

    So, if K11 has a formula that turns to data, how can I include it in the overall average and continue to not include L11 and M11….and then include L11 once the formula turns to data and continue to not include M11….etc.?


    Thanks for all your help!! =)

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: average formula without using cells that have "empty" formulas

    try playing around with either averageA() or averageif()
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: average formula without using cells that have "empty" formulas

    If your formulas produce a numeric result (including 0) in K11, L11 or M11 they will be used in the average. If they don't produce a numeric result (""), the AVERAGE function in Excel ignores those cells towards the average.

    - Moo

  4. #4
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: average formula without using cells that have "empty" formulas

    =SUM(H11:M11)/COUNTIF(H11:M11,">0")
    Formula will not include empty cells and take average only cells that greater than 0

  5. #5
    Registered User
    Join Date
    10-24-2012
    Location
    Hawaii
    MS-Off Ver
    Excel for Mac 2011
    Posts
    3

    Re: average formula without using cells that have "empty" formulas

    Ok, I've been playing around with some IF formulas, but still turning up nothing.

    =IF(K11="",AVERAGE(H11:K11),AVERAGE(H11:J11))

    That formula works only if K11 has a number replacing the #DIV/O!. But, it doesn't help me get the AVERAGE of H11:M11 because L11 and M11 still have #DIV/0! in the cells. I guess I don't know what to type into the formula to represent a formula (that doesn't have data being plugged into it) or #DIV/0!. Also, I don't know how to create an IF, when a previous IF has been fulfilled.

    Thanks for the formula, eisayew, but it did not work. =(

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: average formula without using cells that have "empty" formulas

    If you'll upload a sample workbook, will be better for all.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  7. #7
    Registered User
    Join Date
    10-24-2012
    Location
    Hawaii
    MS-Off Ver
    Excel for Mac 2011
    Posts
    3

    Re: average formula without using cells that have "empty" formulas

    Unfortunately, I can't upload a sample workbook due to privacy issues. However, I'm pretty sure that I have figured out the formula! As of right now, the following formula seems to be doing wonders.

    =AVERAGEIFS(H11:M11,H11:M11,">0")

    Thanks to all who helped give me hints and clues. =D

+ 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