+ Reply to Thread
Results 1 to 5 of 5

Conditional formatting based on maximum deviation in range

  1. #1
    Registered User
    Join Date
    09-28-2017
    Location
    Ontario
    MS-Off Ver
    Excel for Microsoft 365 MSO (version 2311)
    Posts
    11

    Conditional formatting based on maximum deviation in range

    I have a range of cells containing measurements, formatted as fractions to 2 digits: 68 3/16, 67 7/8, 67 3/4, 67 15/16, etc. I am trying to add conditional formatting that will analyze and highlight the range based on 3 scenarios

    Green: difference from largest to smallest numbers is between (and including) 0 & 1/4
    Yellow: difference from largest to smallest numbers is between 1/4 and 1/2
    Red: difference from largest to smallest is greater than 1/2

    I have multiple sets of ranges, independent of one another by a blank row right now. Can I add some kind of IF statement for the CF based on if there is a number in the cell above or below to set the range, or how can I apply this to the entire column?

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Conditional formatting based on maximum deviation in range

    Will the Elevation column always be made up of a single character followed by 1 or more digits?

    Also, please confirm that you are still using XL2013 - later versions have the MAXIFS and MINIFS functions, which would make things a bit easier.

    Pete

  3. #3
    Registered User
    Join Date
    09-28-2017
    Location
    Ontario
    MS-Off Ver
    Excel for Microsoft 365 MSO (version 2311)
    Posts
    11

    Re: Conditional formatting based on maximum deviation in range

    elevation column will not always be single character, but probably 95% of the time. If my scope has more than 26 areas being measured, the naming convention may change slightly

    working in excel for microsoft 365 - can confirm I have access to MAXIFS and MINIFS

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,733

    Re: Conditional formatting based on maximum deviation in range

    To show you how this could be done, put this formula in cell F4 of your sample file, and copy down to F62:

    =IF(C4="","",MAXIFS(D:D,C:C,LEFT(C4)&"*")-MINIFS(D:D,C:C,LEFT(C4)&"*"))

    It will give you the difference between the largest and smallest within each Elevation group, or return a blank on blank rows. You could use this helper column to determine the colour to display within Conditional Formatting - let me know if you need help in setting up the rules.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    09-28-2017
    Location
    Ontario
    MS-Off Ver
    Excel for Microsoft 365 MSO (version 2311)
    Posts
    11

    Re: Conditional formatting based on maximum deviation in range

    Thanks Pete - I think that will get me what I want to do. Didn't think about doing it this way, but should be able to set up the rules based on the helper column.

+ 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. Replies: 3
    Last Post: 10-31-2013, 04:50 AM
  2. Replies: 4
    Last Post: 10-19-2013, 08:58 AM
  3. [SOLVED] Conditional Formatting based on maximum date to another column
    By farrukh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-13-2013, 09:37 AM
  4. Replies: 3
    Last Post: 08-13-2013, 09:44 AM
  5. Conditional Formatting via VBA: Change formatting in range based on value of each cell
    By ralphjmedia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2013, 10:37 AM
  6. [SOLVED] Conditional Formatting for Standard Deviation
    By OverKnight in forum Excel General
    Replies: 4
    Last Post: 01-16-2013, 07:08 PM
  7. [SOLVED] Conditional formatting based on deviation values.
    By pyol17 in forum Excel General
    Replies: 6
    Last Post: 10-04-2012, 03:04 AM
  8. Conditional Formatting - Grey Out and Lock A range based on a cell value in that range
    By Excelgnome in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-14-2012, 07:31 PM

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