Consulting

Results 1 to 12 of 12

Thread: Solved: Average if

  1. #1
    VBAX Regular
    Joined
    Mar 2008
    Posts
    90
    Location

    Thumbs down Solved: Average if

    hello,

    I have this issue.

    I need to obtain the average value of 10 cells excluding the blank cell or those cells which are equal to zero.

    for example , i need to get the average value of
    a2,c2,e2,g2,h2,i2,n2,o2,p2 and a2=4,c2=3 and e2=7, other cells are 0 for the moment.

    what formula I need to use to get the right average value?

    thanks!

  2. #2
    VBAX Newbie
    Joined
    May 2012
    Posts
    4
    Location
    =AVERAGEIF(A2,C2,E2,G2,H2,I2,N2,O2,P2,"<>0")

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    This formula should do it

    =AVERAGE(IF(N(OFFSET(A2,0,{0,2,4,7,8,13,14,15},1,1))<>0,N(OFFSET(A2,0,{0,2, 4,7,8,13,14,15},1,1))))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    VBAX Regular
    Joined
    Mar 2008
    Posts
    90
    Location

    Smile

    Hello again,

    I've attached an example ..because i don't understand xld formula.

    In the first sheet in the blue cell I should get 3.67 instead of 0.92.

    If you have time , maybe you will apply the formula on my example.

    thanks!
    Attached Files Attached Files

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You want

    =AVERAGE(IF(N(OFFSET(Evaluare!A15,0,{4,7,10,13,16,19,22,25},1,1))<>0,N(OFFS ET(Evaluare!A15,0,{4,7,10,13,16,19,22,25},1,1))))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  6. #6
    VBAX Regular
    Joined
    Mar 2008
    Posts
    90
    Location
    I get the "#Name?" error what should I do?

  7. #7
    VBAX Regular
    Joined
    Mar 2008
    Posts
    90
    Location
    done it! thanks!!

  8. #8
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Aaah, the forum injected a space in the second OFFSET
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  9. #9
    VBAX Regular
    Joined
    Mar 2008
    Posts
    90
    Location
    Ok I marked it as solved.. but I need the same thing for the next cells

    I'm trying by myself but I'm not very sure that I'll get the right result!

    thanks!

  10. #10
    VBAX Regular
    Joined
    Mar 2008
    Posts
    90
    Location
    hmm think I get it! !

  11. #11
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Did you just change both Evaluare!A15 to Evaluare!A18?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  12. #12
    VBAX Regular
    Joined
    Mar 2008
    Posts
    90
    Location
    yap I had blank cells in the second sheet and I got #div0! error

    thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •