+ Reply to Thread
Results 1 to 18 of 18

OR function

  1. #1
    Registered User
    Join Date
    10-28-2013
    Location
    Nederland
    MS-Off Ver
    Excel 2010
    Posts
    20

    Question OR function

    I want to create a conditional format

    it should turn red if Y8 OR AS8 is blanc

    I thought it was this

    =OR(Y8="";(AS8=""))

    but it still only turns red if BOTH are blanc!

    ah driving me nuts!

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: OR function

    Don't think this is the problem, but you have extra unneeded () in there.
    Try
    =OR(Y8="";AS8="")

    If this still only formats if BOTH are blank, then 1 or both of your cells are not really blank.
    Do those cells contain formulas? Can you post those formulas?

  3. #3
    Registered User
    Join Date
    10-28-2013
    Location
    Nederland
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: OR function

    Hi thanks for your help

    no didn't work

    the fields are empty!

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: OR function

    Try this:
    =OR(AND(Y8="",AS8<>""),AND(Y8<>"",AS8=""))
    Quang PT

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: OR function

    Quote Originally Posted by Ir1e View Post
    the fields are empty!

    well it certainly doesn't appear that way..

    What does it return if you enter the formula directly in a cell (not conditional formatting)?
    Also, do them seperately
    =Y8=""
    =AS8="'
    ?

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: OR function

    the OR test should work is the cells are actually empty.

    check the CF formula has not changed the cell references due to relative cell references.

    is still stuck post workbook example
    Cheers
    Andy
    www.andypope.info

  7. #7
    Registered User
    Join Date
    10-28-2013
    Location
    Nederland
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: OR function

    =or(and(y8="";as8<>"");and(y8<>"";as8="")) = false
    =y8="" = true
    =as8="" = true

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: OR function

    I can't see any reason for it to not work.

    It's probably time to post an example workbook that is displaying this behavior.

  9. #9
    Registered User
    Join Date
    10-28-2013
    Location
    Nederland
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: OR function

    Quote Originally Posted by Jonmo1 View Post
    I can't see any reason for it to not work.

    It's probably time to post an example workbook that is displaying this behavior.
    ehmmmm sorry I don't know how to add a file on the forum???

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: OR function

    Click Go Advanced at the bottom right
    Then find the Attachments button (looks like a paperclip)
    Should be self explainatory from there.

  11. #11
    Registered User
    Join Date
    10-28-2013
    Location
    Nederland
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: OR function

    ok here it is
    Attached Files Attached Files

  12. #12
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: OR function

    Which cell in that book is displaying the behavior you've described?

    I don't see any conditional formats with OR in them..
    Your dataset doesn't even extend out to column AS...

  13. #13
    Registered User
    Join Date
    10-28-2013
    Location
    Nederland
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: OR function

    I made it so that if anything is filled in in certain regions then the price turns red
    so my colleagues know they need to provide that currency

    but there are more than one that use Dollars or Euros
    (I marked the X's that is should be)

    I though it was easier to use the blanc options so now they turn white if they are blanc...


    but now I'd like if either US (E4) OR CAN (Y4) is empty to turn AE4 white but also if both are empty
    but the exact opposite happens
    Last edited by Ir1e; 10-29-2013 at 12:02 PM.

  14. #14
    Registered User
    Join Date
    10-28-2013
    Location
    Nederland
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: OR function

    Quote Originally Posted by Jonmo1 View Post
    Which cell in that book is displaying the behavior you've described?

    I don't see any conditional formats with OR in them..
    Your dataset doesn't even extend out to column AS...

    yeah I copied a part of the file

    I can't share business stuff here....

  15. #15
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: OR function

    I really think you should reverse the logic of your existing conditional formats...

    You currently have it set so that
    The Standard Fill is Yellow for the whole sheet.
    And applying conditional formatting to the whole sheet that says if the cell is blank make it white.

    Reverse that.
    Set the standard format to White and use conditional formatting to apply yellow formats when a cell is NOT blank.

    That's where I would start.

    And for testing 2 cells, it would be
    =OR($E4<>"",$S4<>"")

  16. #16
    Registered User
    Join Date
    10-28-2013
    Location
    Nederland
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: OR function

    and with the red part???
    those are not the ones that need to be filled to change the color

    I don't know how to do that? especially not if two fields need to be checked

  17. #17
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: OR function

    Let's step back to post #8

    Post a workbook that currently displays the incorrect behaviour you're describing.
    Where an OR formula doesn't do what you expect it to do in conditional formatting.
    The book you posted does not do this.

    It's very difficult to visualize what you're trying to achieve.

    It's just as important to understand which cells you want to change color, as it is to understand which cells the formula refers to.
    so which cells do you put the CF in, and which cells does that formula refer to, and what results do you expect.

  18. #18
    Registered User
    Join Date
    10-28-2013
    Location
    Nederland
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: OR function

    Thanks everybody!

    Finally was able to figure it out!

    I reversed the logic and then =OR(E4<>"";S4<>"") did the trick!

    I attached the result!
    Attached Files Attached Files

+ 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] IF Function referencing IsNumber, Match, Left function on separate sheets
    By Touch9713 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-12-2013, 10:09 PM
  2. [SOLVED] Using Offset function as the array in the PercentRank function is giving wrong result
    By Bobneil in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-06-2013, 09:29 PM
  3. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  4. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  5. Excel - User Defined Function Error: This function takes no argume
    By BruceInCalgary in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2006, 04:05 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