+ Reply to Thread
Results 1 to 5 of 5

Calculating Percentage based on Dynamic Cells

  1. #1
    Banned User!
    Join Date
    08-14-2008
    Location
    India
    MS-Off Ver
    Excel 2003 and 2007 - Expertise Novice
    Posts
    69

    Calculating Percentage based on Dynamic Cells

    Hi Everyone,

    Need a small help

    I need to calculate the percentage based on self populating score. however I want excel/formula to ignore any cells which has "NA" in it so that it calculates the percentage based only on the cells having Numbers.

    Now these Cells which contain Numbers might or might not contain numbers based on the "IF" function which decides wether the cell will have numbers or will remain "blank" or have "NA"

    To understand better please have a look at the enclosed sample (that would explain my need better)

    Thanks In advance
    Attached Files Attached Files
    Last edited by dimitrz; 12-17-2008 at 04:45 AM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    I expect I'm being very dense, but why is the average of 10 and -5 equal to 50%?

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    From XL ' s help :

    If an array or reference argument contains text, logical values, or empty cells, those values are ignored; however, cells with the value zero are included.


    So, your NA problem has already been solved by the makers of XL

    If you want to disregard the 0 values try

    =average(if(your_range<>0,your_range,false)) entered as an array function

    ( in this formula negative values are taken into account)
    Last edited by arthurbr; 12-15-2008 at 09:14 AM.

  4. #4
    Banned User!
    Join Date
    08-14-2008
    Location
    India
    MS-Off Ver
    Excel 2003 and 2007 - Expertise Novice
    Posts
    69
    StephenR : the reason its 50% is that I am a nitwit You are right it should be 25 % ( the maximum value in a cell is 10 - so if only two cell has value then the main figure would be the actual value which in this case is 10 - 5 divided by the maximum possible that is 20 (since one cell is NA )= 25 %


    arthurbr : ideally I was not looking for that answer - however you answer did give me the fuel to think - so I used this formula

    =AVERAGE(B1:B3)

    Unfortunately it was giving an incorrect figure of 250 % , so what I have done is I have modified the formula to =AVERAGE(B1:B3)/10 to get 25% display.

    I am not sure whether this work around is the right work around or whether it might collapse later on.

    Thanks

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    The average of 10 and -5 is 2.5, or 250%. If the numbers in B6 and B5 were 10% and -5%, then the result of the formula =AVERAGE(B6:B8) would be (correctly) 2.5%.
    Entia non sunt multiplicanda sine necessitate

+ 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