We’d like to remind Forumites to please avoid political debate on the Forum.

This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.

📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
The Forum now has a brand new text editor, adding a bunch of handy features to use when creating posts. Read more in our how-to guide

Excel - Conditional Formatting Query

Cotta
Cotta Posts: 3,667 Forumite
Hi All,

I have a "conditional formatting" function within a number of cells so that anything => 70% but <75% is returned as an amber. All is good thus far, however one of the cells in question has 70% in it but is returning red, the trouble in the cells value is 69.9% but has been automatically rounded up to 70%, is there anyway to correct this?

Thanks

Comments

  • Stompa
    Stompa Posts: 8,390 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    edited 18 November 2014 at 5:01PM
    A quick and dirty way would be to use >=69.5% and <74.5%, though it would break if you were to change the number of decimal places displayed in the cell.
    Stompa
  • Cotta
    Cotta Posts: 3,667 Forumite
    Stompa wrote: »
    A quick and dirty way would be to use >=69.5% and <74.5%, though it would break if you were to change the number of decimal places displayed in the cell.

    That will probably be the best option, thanks.
  • maas
    maas Posts: 512 Forumite
    Part of the Furniture 100 Posts I've been Money Tipped!
    Stompa wrote: »
    A quick and dirty way would be to use >=69.5% and <74.5%, though it would break if you were to change the number of decimal places displayed in the cell.

    Should that be;

    >=69.5% and <75.5%

    Also I dont think the conditional formatting works on what the cell looks like (i.e its format) but the underlying value. So regardless of how you format the cell it should show the same color determined by the value (in this case 0.699).
  • Stompa
    Stompa Posts: 8,390 Forumite
    Part of the Furniture 1,000 Posts Name Dropper
    edited 18 November 2014 at 5:55PM
    maas wrote: »
    Should that be;

    >=69.5% and <75.5%
    No, I don't think so, the original requirement was <75%. Rounding will cause values >=74.5% to display as >=75%, so you need to use <74.5%.
    maas wrote: »
    Also I dont think the conditional formatting works on what the cell looks like (i.e its format) but the underlying value. So regardless of how you format the cell it should show the same color determined by the value (in this case 0.699).

    If I've understood correctly, I think the issue is that the OP wants the colouring to depend on the displayed value rather than the actual underlying value.
    Stompa
  • I think the OP wants 69.9% to display as 70% and to qualify for amber colour which is for values >=70%.

    If you are able to hold the underlying value in Excel rounded to 2 decimals, (i.e. =ROUND(InsertYourNumberHere,2) then your conditional formatting will work regardless of the number of decimals you display.

    However, you need to keep in mind that Excel would now see your original 69.9% as 70.0% in any subsequent calculations.
This discussion has been closed.
Meet your Ambassadors

🚀 Getting Started

Hi new member!

Our Getting Started Guide will help you get the most out of the Forum

Categories

  • All Categories
  • 353.5K Banking & Borrowing
  • 254.2K Reduce Debt & Boost Income
  • 455K Spending & Discounts
  • 246.6K Work, Benefits & Business
  • 602.9K Mortgages, Homes & Bills
  • 178.1K Life & Family
  • 260.6K Travel & Transport
  • 1.5M Hobbies & Leisure
  • 16K Discuss & Feedback
  • 37.7K Read-Only Boards

Is this how you want to be seen?

We see you are using a default avatar. It takes only a few seconds to pick a picture.