+ Reply to Thread
Results 1 to 11 of 11

MAX(Round to no decimals

  1. #1
    Registered User
    Join Date
    05-10-2012
    Location
    Olathe, KS
    MS-Off Ver
    Excel 2010
    Posts
    42

    MAX(Round to no decimals

    This formula gives a “Fail” for the cell range below. Cell $G$67 has the value of 20. How do I edit the formula below using the Round function to 0 decimals? I want the 20.02 to Pass.
    =IF(MAX(P51:P59)>=$G$67,"Fail","Pass")

    P
    0.23
    0.14
    0.38
    0.54
    0.10
    0.00
    0.38
    0.54
    20.02
    Fail

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: MAX(Round to no decimals

    Do you mean?

    =IF(ROUND(MAX(P51:P59),0)>=$G$67,"Fail","Pass")

    but if you want to pass, then you don't want the = sign

    =IF(ROUND(MAX(P51:P59),0)>$G$67,"Fail","Pass")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    05-10-2012
    Location
    Olathe, KS
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: MAX(Round to no decimals

    The 20.02 cell still causes a "Fail" with your formula. I want the formula to round the 20.02 (max) value to no decimals before it compares to the acceptance value of 20.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: MAX(Round to no decimals

    Did you catch the 2nd formula where I removed the = from >=?

  5. #5
    Registered User
    Join Date
    05-10-2012
    Location
    Olathe, KS
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: MAX(Round to no decimals

    OK, I removed the = sign and 20.003 still causes "Fail". The Round formula needs to round the 20.003 cell value to no decimals (i.e., to "20"), then compare to acceptance value of 20 for a Pass.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: MAX(Round to no decimals

    Are you sure that G67 actually contains 20? What does the formula show when you select G67?

  7. #7
    Registered User
    Join Date
    05-10-2012
    Location
    Olathe, KS
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: MAX(Round to no decimals

    Yes, it shows 20. It's formatted as a Number and set to no decimal places.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: MAX(Round to no decimals

    I just tested this formula:

    =IF(ROUND(MAX(P51:P59),0)>$G$67,"Fail","Pass")

    with a cell containing 20.003 and G67 containing a 20... and I got "Pass".

    Do you have Automatic calculations set on? Go to Formulas tab, and in Calculations sections, select Calculation Options, then Automatic,

  9. #9
    Registered User
    Join Date
    05-10-2012
    Location
    Olathe, KS
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: MAX(Round to no decimals

    OK, it worked! Thanks!

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: MAX(Round to no decimals

    It was the Auto calcs?

  11. #11
    Registered User
    Join Date
    05-10-2012
    Location
    Olathe, KS
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: MAX(Round to no decimals

    No. I had several examples I was testing and I was looking at the wrong one.

+ 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