+ Reply to Thread
Results 1 to 5 of 5

Control decimal places used for conditional formating

  1. #1
    Registered User
    Join Date
    11-06-2013
    Location
    NC
    MS-Off Ver
    Excel 2007
    Posts
    42

    Post Control decimal places used for conditional formating

    I am attempting to use conditional formating to provide obvious accept/reject messages for dimensional inspections being conducted. If the inspection data is within the measurement tolerance, the conditional format will display the value in green and if the value is out of the measurement tolerance, the conditional format will display the value in red.

    I have a 3 decimal place measurement requirement. I am using a formula that averages 4 measurements that are taken to determine the acceptablity of the dimension. I then round the average to 3 decimal places to display the value.

    Conditional formating however apparently uses all existing decimal places when it evaluates the value in that cell. As a result, a number displayed as 3 decimal places and when averaged is within the limit, displays as value in red or "rejected".

    Example: Upper Limit: 3.420
    Average of 4 Dimensions: 3.4201
    Rounded to 3 decimal places: 3.420 (within tolerance)
    Conditional format displays the 3.420 in red indicating it is out of limit. Obviously it is not using the rounded value.

    I believe this is caused by the lack of rounding by the conditional formating. In other words, it appears conditional formating uses all available decimal places to determine the value of the averaged number and sees the value as out of the tolerance. In the cell containing the value, I have tried using the Round and Fixed formats in the formulas with no sucess.

    Any ideas how to control conditional formating to use only 3 decimal places?

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Control decimal places used for conditional formating

    Use conditional formatting formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Adjust cell reference, value etc. to suit.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    11-06-2013
    Location
    NC
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Control decimal places used for conditional formating

    Thanks. Got it to work.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Control decimal places used for conditional formating

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  5. #5
    Registered User
    Join Date
    11-06-2013
    Location
    NC
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Control decimal places used for conditional formating

    Thanks for the assistance. I am new to this forum and do not know the rules or proper form. For the record, I was able to resolve the problem on my own. The advice I received, albeit appropriate for the 1 cell that contained that limit, did not resolve it for the larger spreadsheet.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Adusting decimal places based on greatest number of places in a series
    By anelson87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2022, 01:05 PM
  2. conditional decimal places?
    By naat in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-19-2013, 03:10 AM
  3. Conditional Number Format for varying decimal places
    By justme23 in forum Excel General
    Replies: 3
    Last Post: 04-30-2010, 03:31 PM
  4. conditional formatting for 0 in 2 decimal places
    By mingali in forum Excel General
    Replies: 11
    Last Post: 02-27-2010, 05:34 AM
  5. Help with formating cells (decimal places)
    By madhead4000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-03-2006, 04:40 PM

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