+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting Formula

  1. #1
    Registered User
    Join Date
    07-24-2017
    Location
    Vancouver, BC
    MS-Off Ver
    2016 (365)
    Posts
    62

    Question Conditional Formatting Formula

    Hello,

    I am trying to write a conditional formatting formula for the attached sheet.
    What I need to happen is this:

    CELL I46 will turn red and in yellow text say "SEND TO HOSPITAL"
    IF
    CELL J47 is less than 25
    OR
    IF
    There are two (2) or more symptoms selected in Section VIII
    OR
    IF
    There is one (1) symptom selected in Section VIII AND one (1) abnormal selected in Section XI

    Hope that makes sense. I've tried nested IF statements, I've tried with various forms of OR and AND, I can't seem to figure out the right combination.

    100 Karma for your help!
    Attached Files Attached Files

  2. #2
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Conditional Formatting Formula

    Quote Originally Posted by Canadian911Guy View Post
    CELL I46 will turn red and in yellow text say "SEND TO HOSPITAL"
    You have cells H46 through K46 merged. That merged area would be referred to as H46.
    Because of the merge, there is no I46.

    Assuming that you meant H46, try this:

    H46 =IF(OR($J47<25,COUNTA($E20:$E24)+COUNTA($I20:$I24)>=2,AND(COUNTA($E20:$E24)+COUNTA($I20:$I24)=1,COUNTIF($G35:$K38,"Abnormal")=1)),"SEND TO HOSPITAL","")

    Select H46 > Conditional Formatting > New Rule > Use a formula

    =OR($J47<25,COUNTA($E20:$E24)+COUNTA($I20:$I24)>=2,AND(COUNTA($E20:$E24)+COUNTA($I20:$I24)=1,COUNTIF($G35:$K38,"Abnormal")=1))

    Format: Fill red, Font yellow > OK > OK
    Last edited by 63falcondude; 05-11-2018 at 03:11 PM. Reason: Spelling

  3. #3
    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,944

    Re: Conditional Formatting Formula

    Formula in H46 (merged cell)

    =IF(OR(J47<25,COUNTIF($E$20:$E$24,"X")+COUNTIF($I$20:$I$24,"X")>2,AND(COUNTIF($E$20:$E$24,"X")+COUNTIF($I$20:$I$24,"X")=1,COUNTIF($G$35:$K$38,"Abnormal")=1)),"SEND TO HOSPITAL","")

    in Conditional formatting

    =$H$6="SEND TO HOSPITAL"

    FILL: Red

    Font: Yellow
    Attached Files Attached Files
    Last edited by JohnTopley; 05-11-2018 at 03:08 PM.

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Conditional Formatting Formula

    Wow... duh. I did the CF formula before the cell formula and didn't even think to refer to the result of the cell formula.

    O.P., I would use the CF rule in post #3 over mine.

    ... and i misspelled hospital... long week.
    Last edited by 63falcondude; 05-11-2018 at 03:12 PM.

  5. #5
    Registered User
    Join Date
    07-24-2017
    Location
    Vancouver, BC
    MS-Off Ver
    2016 (365)
    Posts
    62

    Cool Re: Conditional Formatting Formula

    THANK YOU BOTH!

    I took pieces from each and got it to work. I've attached the final result.

    100 Karma for you both!
    Attached Files Attached Files

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Conditional Formatting Formula

    You're welcome. Glad we could help.

+ 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: 06-19-2015, 07:16 AM
  2. Formatting Cells with Date or Text Values in a Conditional Formatting Formula
    By Phil Hageman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2014, 09:36 AM
  3. Opening xlsm files with conditional formatting opens with removed conditional formatting
    By Martijn.Steenbakker in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-07-2014, 05:38 AM
  4. If Formula - conditional formatting - three different formatting rules
    By sharper1989 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-25-2014, 04:49 PM
  5. Replies: 3
    Last Post: 11-28-2013, 02:11 AM
  6. Replies: 1
    Last Post: 07-19-2012, 05:37 AM
  7. Replies: 6
    Last Post: 03-12-2006, 06:30 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