+ Reply to Thread
Results 1 to 9 of 9

Excel Rounding Problems

Hybrid View

  1. #1
    Registered User
    Join Date
    01-16-2009
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    13
    Quote Originally Posted by shg View Post
    =if(a1 < 80%, 0, if(a1 < 100%, a1 - 80%, 20% ))
    Thanks for the help,

    However, the central formula within the original works as does yours.
    The issues i'm having is when the formula rounds it to down to the lowest integer. This has to be done as in practice cell A will contain percentages to 2 decimal places. i.e 93.45% or 0.9345.
    At a later date I am gong to need to assign a value to each full percentage point which is reasoning behind rounding.

    Can you offer assistance with this?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    It seems to me that your formula already does what you describe.

    Provide some examples of where it doesn't, and what you want instead.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-16-2009
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    13
    Quote Originally Posted by shg View Post
    It seems to me that your formula already does what you describe.

    Provide some examples of where it doesn't, and what you want instead.
    The formula doesn't appear to work when the section A =82.00%, 83.00%, 84.00%, 85.00%, 86.00% and 87.00%.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    What should it return in those cases?

  5. #5
    Registered User
    Join Date
    01-16-2009
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    13
    Quote Originally Posted by shg View Post
    What should it return in those cases?
    A=82.00% B should = 2
    A=83.00% B should = 3
    A=84.00% B should = 4
    A=85.00% B should = 5
    A=86.00% B should = 6
    and A=87.00% B should = 7

    The original formula should return A-80%*100 ( minus the prior conditions, a<80% and a>100%

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Looks fine to me:
          -A- -B- -----------------------------C------------------------------
      1   78%  0% B1 and down: =IF(A1 < 80%, 0, IF(A1 < 100%, A1 - 80%, 20% ))
      2   80%  0%                                                             
      3   82%  2%                                                             
      4   84%  4%                                                             
      5   86%  6%                                                             
      6   88%  8%                                                             
      7   90% 10%                                                             
      8   92% 12%                                                             
      9   94% 14%
    You could also use =MIN(20%, (A1>80%)*(A1-80%))
    Last edited by shg; 01-19-2009 at 02:59 PM.

  7. #7
    Registered User
    Join Date
    01-16-2009
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    13
    Quote Originally Posted by shg View Post
    Looks fine to me:
          -A- -B- -----------------------------C------------------------------
      1   78%  0% B1 and down: =IF(A1 < 80%, 0, IF(A1 < 100%, A1 - 80%, 20% ))
      2   80%  0%                                                             
      3   82%  2%                                                             
      4   84%  4%                                                             
      5   86%  6%                                                             
      6   88%  8%                                                             
      7   90% 10%                                                             
      8   92% 12%                                                             
      9   94% 14%
    You could also use =MIN(20%, (A1>80%)*(A1-80%))

    Thanks for your help,
    I have no idea why the original formula was returning incorrect figures in my spreadsheet. I have amended it slightly and all seems to be well now

    =INT((IF((A1*100)>100, 20, (IF(80<=(A1*100), (A1*100)-80, 0)))))

    thanks for you help

+ 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