+ Reply to Thread
Results 1 to 9 of 9

"OR " condition for conditional format

  1. #1
    Registered User
    Join Date
    12-13-2011
    Location
    farmington MI
    MS-Off Ver
    Excel 2003
    Posts
    81

    Lightbulb "OR " condition for conditional format

    Hi There Iam looking for OR condition for conditional formatting.

    Example:

    Conditional format formula for unlock cells is =CELL("PROTECT",E5)=0

    I want a cell to change its color either E5 or F5 is unlock

    can i write =CELL("PROTECT",E5)or("PROTECT",H5)=0 ( does not work)

    thanks
    var

  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,791

    Re: "OR " condition for conditional format

    You don't use OR like that. Try it like this:

    =OR(CELL("PROTECT",E5)=0,CELL("PROTECT",H5)=0)

    not sure if you mean F5 or H5

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-13-2011
    Location
    farmington MI
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: "OR " condition for conditional format

    Hi thanks for reply, that works but....................................

    my work sheet has been set up in a different way based on our requirements.

    I want my conditional format must be disabled if E5 or H5 are locked. how do i go about it..


    regards
    var

  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,791

    Re: "OR " condition for conditional format

    This is what you said before:

    I want a cell to change its color either E5 or F5 is unlock
    Are you now saying the opposite of that? I don't understand what you mean by "disabled".

    Pete

  5. #5
    Registered User
    Join Date
    12-13-2011
    Location
    farmington MI
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: "OR " condition for conditional format

    yes exactly. i want opposite of that..
    regards
    var

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

    Re: "OR " condition for conditional format

    Put NOT( ... ) around it all then.

    Pete

  7. #7
    Registered User
    Join Date
    12-13-2011
    Location
    farmington MI
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: "OR " condition for conditional format

    Apologies,

    Let me explain waht I want..

    cell A1 must be gary in color only if E5 and F5 are unlocked.

    If Both OR one out of E5 , F5 is locked , then conditional format should not work. so A1 cell turns to white color (default color).

    Hope i'm clear this time.

    regards-var

  8. #8
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: "OR " condition for conditional format

    Try AND

    =AND(CELL("PROTECT",E5)=0,CELL("PROTECT",H5)=0)

    Note that changing the cell from locked to unlocked or vice versa won't trigger a change in the conditional formatting automatically......
    Audere est facere

  9. #9
    Registered User
    Join Date
    12-13-2011
    Location
    farmington MI
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: "OR " condition for conditional format

    I'm kind of thinking too much.....i think i shd use AND instead of OR..
    i got it


    thanks..var

+ 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