+ Reply to Thread
Results 1 to 5 of 5

count if / average only when a value is present

Hybrid View

  1. #1
    Registered User
    Join Date
    11-27-2012
    Location
    Arkansas
    MS-Off Ver
    Excel 2000
    Posts
    42

    count if / average only when a value is present

    Hi All,

    Trying to count if only when there is a value present on the SP page. I'm trying to show the average of the numbers (will weight afterwards) onto the Summary page for each qtr and month.

    This is what I have now but can't seem to figure out why it doesn't work.

    =IF(COUNT(SP!C3:E5),AVERAGE(SP!C3:E5),"")

    Thanks for your help.
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: count if / average only when a value is present

    try this array formula..

    =AVERAGE(IF(ISERROR(SP!C3:E3),FALSE,IF(SP!C3:E3="",FALSE,SP!C3:E3)))
    confirm with Ctrl+Shift+Enter and not just Enter

    Adjust ranges accordingly
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: count if / average only when a value is present

    Try this ARRAY FORMULA, completed by holding down CTRL and SHIFT when you press ENTER (instead of just pressing ENTER)
    J5: =AVERAGE(IF(ISNUMBER(SP!C3:E3),SP!C3:E3))
    Does that helP?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    11-27-2012
    Location
    Arkansas
    MS-Off Ver
    Excel 2000
    Posts
    42

    Re: count if / average only when a value is present

    That is close but I need it to return a blank or not an error if the support page (SP) does not have a value or is an error.

  5. #5
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: count if / average only when a value is present

    Try this..

    =IF(ISERROR(AVERAGE(IF(ISERROR(SP!C3:E3),FALSE,IF(SP!C3:E3="",FALSE,SP!C3:E3)))),"",AVERAGE(IF(ISERROR(SP!C3:E3),FALSE,IF(SP!C3:E3="",FALSE,SP!C3:E3))))
    or edited version of Ron's formula

    =IF(ISERROR(AVERAGE(IF(ISNUMBER(SP!C3:E3),SP!C3:E3))),"",AVERAGE(IF(ISNUMBER(SP!C3:E3),SP!C3:E3)))

+ 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