+ Reply to Thread
Results 1 to 7 of 7

Formula-Percentage Error

  1. #1
    Registered User
    Join Date
    11-07-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2010
    Posts
    16

    Formula-Percentage Error

    I am having an issue with the following cells returning inccorect percentages. Can someone help me figure out what I'm missing? It works in some examples, but not all.
    H23: =IF(F22=0,"",(F23-F22)/F22)
    H24: =IF(F23=0,"",(F24-F23)/F23)

    I have attached the spreadsheet in question. Examples are on separate tabs.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula-Percentage Error

    f22 does not = 0 it is 0.20
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula-Percentage Error

    Hi,

    H23 is working correctly.

    I think you've missed the point that the divisor F22 has a value of 0.2 and not zero as you probably think since the formatting is set to zero decimal places.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor
    Join Date
    11-05-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    229

    Re: Formula-Percentage Error

    Hi!

    In your sample sheet, even though F22 is showing as zero, it isn't really zero. Its value is 0.20, rounded to zero.
    Use the formula =IF(ROUND(F22,0)=0,"",(F23-F22)/F22), and you won't face this problem.

    Don't forget to click the little star to the left of this post if you feel I helped!
    Taming the Excel dragon... www.TheExcelphile.com

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: Formula-Percentage Error

    I suggest you change the formula in F22 to this:

    =ROUND(D22*G22,0)

    then copy it down, to ensure that values showing as zero really are zero (and not 0.2, as in the case you presented us with).

    Hope this helps.

    Pete

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: Formula-Percentage Error

    Wow !! 4 posts, all saying the same thing within 3 minutes of each other.

    Pete

  7. #7
    Registered User
    Join Date
    11-07-2012
    Location
    Charlotte, NC
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Formula-Percentage Error

    Blonde moment....thank you all!!!

+ 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