+ Reply to Thread
Results 1 to 10 of 10

Conditional formatting- multiple conditions

  1. #1
    Registered User
    Join Date
    01-22-2017
    Location
    Columbus, NJ
    MS-Off Ver
    2016
    Posts
    5

    Conditional formatting- multiple conditions

    Hi all. I am completely new to this forum and don't have super Excel skills but I have been attempting, without success, to perform conditional formatting that will act on only non-blank cells in a range and then change any of those cell's formatting (fill or font color) if the value within that range does not equal a value in another cell. It sounds simple enough and I have been trying but again, not really all that savvy! I tried nesting an ISBLANK with <> but to no avail.

    This is for managing third grade test scores. I have a sample image below.
    • The total possible points for this problem is 2.
    • If a student gets a 2, I'd like to leave that cell alone.
    • If the student gets a 1 or a zero, I'd like the cell's outline or fill to change to red to reflect the fail and then be able to count the number of failed questions at the bottom to do a percentage of students who have failed a particular question.
    • Finally, if a cell is blank, I need to ignore it until the teacher eventually enters a 0, 1 or 2.


    Capture.PNG

    Thanks you in advance for any tips!

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,844

    Re: Conditional formatting- multiple conditions

    Select your Pts range (I used column B)

    in CF

    Use formula .....

    =AND($B2<>"",$B2<2)

    For Percentage

    =COUNTIF($B$2:$B$100,"<2")/COUNT($B$2:$B$100)

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Conditional formatting- multiple conditions

    Hi,

    Assuming the possible points total is in B1 and the scores start in B4, then in B4 enter the following conditional format (using the formula is option) copied down

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


    A conditional format can't create any new formula so in B14 you'll need to enter

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

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    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. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,780

    Re: Conditional formatting- multiple conditions

    Select the cells containing the results (I'm assuming they are in column B) and use this formula as your CF rule:

    =AND(B4<>"",B4<$B$2)

    Change the reference to reflect the top cell in the range and the reference cell.

    This in the cell where the percentage is to be calculated:

    =COUNTIF(B4:B13,"<"&$B$2)/(COUNT(B4:B13)+COUNTBLANK(B4:B13))

    formatted as a percentage.
    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.

  5. #5
    Registered User
    Join Date
    01-22-2017
    Location
    Columbus, NJ
    MS-Off Ver
    2016
    Posts
    5

    Re: Conditional formatting- multiple conditions

    Thank you, John!

  6. #6
    Registered User
    Join Date
    01-22-2017
    Location
    Columbus, NJ
    MS-Off Ver
    2016
    Posts
    5

    Re: Conditional formatting- multiple conditions

    Thank you, Richard!

  7. #7
    Registered User
    Join Date
    01-22-2017
    Location
    Columbus, NJ
    MS-Off Ver
    2016
    Posts
    5

    Re: Conditional formatting- multiple conditions

    Thank you, Ali!

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,844

    Re: Conditional formatting- multiple conditions

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  9. #9
    Registered User
    Join Date
    01-22-2017
    Location
    Columbus, NJ
    MS-Off Ver
    2016
    Posts
    5

    Re: Conditional formatting- multiple conditions

    Done. Thanks John.

  10. #10
    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. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,780

    Re: Conditional formatting- multiple conditions

    You're welcome!

+ 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. [SOLVED] Conditional Formatting with multiple conditions
    By D_Landry in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-11-2016, 01:13 PM
  2. conditional formatting with multiple conditions
    By henk400 in forum Excel General
    Replies: 5
    Last Post: 03-23-2015, 07:15 AM
  3. Multiple Conditions for Conditional Formatting
    By bhardison1014 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-12-2013, 06:33 PM
  4. Conditional Formatting for multiple conditions
    By ExcelNoobie1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-02-2012, 03:37 PM
  5. Excel 2007 : Conditional Formatting: Multiple conditions
    By mike_braden in forum Excel General
    Replies: 6
    Last Post: 03-02-2011, 07:56 PM
  6. Conditional Formatting using VBA for multiple conditions
    By stephboucher in forum Excel General
    Replies: 0
    Last Post: 01-18-2011, 10:13 AM
  7. Conditional Formatting with multiple conditions
    By Tink in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 06-11-2009, 01:37 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