+ Reply to Thread
Results 1 to 10 of 10

AVERAGE function breaking conditional formatting - any work-around?

  1. #1
    Registered User
    Join Date
    07-29-2024
    Location
    Copenhagen
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20346) 64-bit
    Posts
    5

    Post AVERAGE function breaking conditional formatting - any work-around?

    Hi!

    I'm new to this forum and thought it would be worth a shot to learn from here !

    I'm trying to conditionally format the fill of specific ranges of dataset cells in colors corrosponding to a range: 1-4 Red, 5-7 Yellow and 8-10 Green.

    Then I would like to find the average (=AVERAGE()), round it up to no decimals and have this value formatted to Red, Yellow or Green too.

    I'm not experienced enough to figure out how to work around the =AVERAGE() function in conditional formatting, as the conditional formatting breaks when a number rounds up from one color into another. E.g. 4.8 (RED) to 5 (YELLOW).

    The white fill cells are where the average rounding error occurs and breaks the formatting.

    The generel idea is to have serveral dataset averages go into an category score overview, and then generate a final average score for the ID.

    I've attached an image as reference. It is a dummy for the sets im working in, but the logic is the same.

    Hopefully, one from the forum could help solve this challenge of mine ..

    Thank you, and all the best,

    Lforlasse
    Attached Images Attached Images

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,181

    Re: AVERAGE function breaking conditional formatting - any work-around?

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook (yellow banner: HOW TO ATTACH YOUR SAMPLE WORKBOOK). Screenshots are of little practical use as we cannot manipulate them.

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. The sample layout accurately matches that of your real data. It also has expected results mocked up, worked examples where required, relevant cells highlighted and a few explanatory notes.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2019
    Posts
    4,542

    Re: AVERAGE function breaking conditional formatting - any work-around?

    Not sure if I understand correctly, but try =ROUNDDOWN(AVERAGE(range),0)

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,172

    Re: AVERAGE function breaking conditional formatting - any work-around?

    This formula conditionally formats a red background::

    =D6<5

    Yellow:

    =AND(D6>=5,D6<8)

    Blue:

    D6>=8

  5. #5
    Registered User
    Join Date
    07-29-2024
    Location
    Copenhagen
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20346) 64-bit
    Posts
    5

    Re: AVERAGE function breaking conditional formatting - any work-around?

    Hi AliGW,

    Thank you for clarifying. I'll look into updating my post with an example workbook and follow that set of yellow box principles ..!

    All the best,
    Lforlasse

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,181

    Re: AVERAGE function breaking conditional formatting - any work-around?

    Did you consider posts #3 and #4?

  7. #7
    Registered User
    Join Date
    07-29-2024
    Location
    Copenhagen
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20346) 64-bit
    Posts
    5

    Re: AVERAGE function breaking conditional formatting - any work-around?

    Hi again,

    Here is the sample workbook, for those of you trying to help me sort this conditional formatting out.

    Thank you all for the help so far - I'll look into the pointes I've received so far, and get back to you when it works as intended.

    Sought solution:
    - Formatting the fill of cells with values (numbers) in specific colors corrosponding to the range of the number: 1-4 red, 5-7 yellow and 8-10 green.
    - Averaging the datasets into avarage values. Keeping the fill formatting.
    - rounding the datasets average values up to have no decimals. Keeping the formatting.
    - gather these values in an overview and compiling a new average (and final score). Keeping the formatting.
    - show the final score for the ID's formatted in red, yellow and green.

    All the best,
    Lasse
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    07-29-2024
    Location
    Copenhagen
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20346) 64-bit
    Posts
    5

    Re: AVERAGE function breaking conditional formatting - any work-around?

    Thank you for replying. This seemed to work!

    I'm a total beginner, learning my way into the Excel world - I appreciate you taking your time to help me.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,181

    Re: AVERAGE function breaking conditional formatting - any work-around?

    What worked? Which post?

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  10. #10
    Registered User
    Join Date
    07-29-2024
    Location
    Copenhagen
    MS-Off Ver
    Microsoft? Excel? for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20346) 64-bit
    Posts
    5

    Re: AVERAGE function breaking conditional formatting - any work-around?

    Thank you for your help in post #3. This worked to solve my issue of rounding the numbers correctly with the formatting.

+ 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. Conditional formatting breaking when inserting/deleting rows
    By nickmax1 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-06-2021, 04:33 AM
  2. Inserting Rows and Breaking Conditional Formatting
    By scottrperry in forum Excel General
    Replies: 2
    Last Post: 01-18-2021, 12:07 PM
  3. Replies: 1
    Last Post: 07-23-2015, 11:03 PM
  4. Replies: 7
    Last Post: 06-20-2015, 02:12 PM
  5. Replies: 1
    Last Post: 07-19-2012, 05:37 AM
  6. Replies: 5
    Last Post: 04-02-2012, 11:07 AM
  7. Why won't the average function work?!
    By jfarlow in forum Excel General
    Replies: 10
    Last Post: 08-15-2008, 07:12 AM

Tags for this Thread

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