+ Reply to Thread
Results 1 to 3 of 3

Average function with Condition

  1. #1
    Registered User
    Join Date
    07-23-2012
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    60

    Average function with Condition

    Dear All,

    I have a row with numbers like.

    1 2 4 0 0 7 8 6 8

    Now i want to have average of all the numbers in a row but excluding the cells having 0. When i apply average function i get average as 4 but what i want is Average 5.14 which is excluding the cells having 0s.

    PLEASE HELP

    Regards
    Mohammad

  2. #2
    Valued Forum Contributor
    Join Date
    03-29-2013
    Location
    United Kingdom
    MS-Off Ver
    Office/Excel 2013
    Posts
    1,749

    Re: Average function with Condition

    Assuming the numbers are in A1:I1

    =SUM(A1:I1)/(COUNT(A1:I1)-COUNTIF(A1:I1,"=0"))
    Elegant Simplicity............. Not Always

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,577

    Re: Average function with Condition

    Try this for range A16:I16

    Please Login or Register  to view this content.

+ 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