+ Reply to Thread
Results 1 to 7 of 7

Need help with some conditional formatting

  1. #1
    Registered User
    Join Date
    08-14-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Need help with some conditional formatting

    Hello Everyone,
    I'm stuck trying to work with conditional formatting where i would like a cell to change its colour if any conditions from one or more adjacent cells are not fullfilled. I have enclosed a sample worksheet that i have to work on. It's for maintaing medical details of clients. This one is for clients who are being given Hep B vaccinations for their treatment. The condition is if a client has said YES when offered Hep B, and no details are entered in the next two coloumns (Hep B Vaccination count, Date of vaccination) then those cells should go red. If client has REFUSED the offer of Hep B vaccination then the next two columns should go grey.

    Please help anyone. Would really appreciate.
    Attached Files Attached Files

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Need help with some conditional formatting

    Apply these two conditions to $D$3:$E$11

    Red: =AND($C2="Yes",$D2="",$E2="")
    Grey: =$C2="Refused"

  3. #3
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Need help with some conditional formatting

    Like this?
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Need help with some conditional formatting

    Part 1 - turns relevant cell in columns D&E red if you've said 'yes' but not entered data.

    Select D3:E11.
    Conditional Formatting > New Rule > Use a formula to determine which cells to format (bottom of list)
    In the box, put =and($c3="Yes",isblank($d3),isblank($e3))
    Hit the format button and create the formatting (red background?)

    Part 2 - turn D&E grey if C says 'Refused'
    Select D3:E11.
    Conditional Formatting > New Rule > Use a formula to determine which cells to format (bottom of list)
    In the box, put =$c3="Refused"
    Hit the format button and create the formatting (grey background?)
    Kind Regards,

    Out of the Hat

    "Computers are stupid - they do EXACTLY what you tell them to"

    If I've helped you with a problem, please say thanks by clicking the small star icon on the left.

  5. #5
    Registered User
    Join Date
    08-14-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Need help with some conditional formatting

    Something like that but i do not want it to stay red if info is entered in the Hep B vaccination count column. Same goes with Date of vaccination column.
    Hope im making sense.

  6. #6
    Registered User
    Join Date
    08-14-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Need help with some conditional formatting

    Thank you Outofthehat, your answer works perfeclty as intended. Thanks to all others who also gave thier advice. CHEERS everyone!!

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Need help with some conditional formatting

    @ Afroz

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon 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 those who helped.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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