+ Reply to Thread
Results 1 to 7 of 7

Conditional formatting and use of OR

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    584

    Conditional formatting and use of OR

    I presently use three separate conditional formatting statements to highlight the exact same areas the same color if a cell is blank, if it has an "n" in it or if it has an "N" in it. I suspect there is probably a good way to use an OR operator and/or something like using ucase or the like.

    Please enlighten me!

  2. #2
    Registered User
    Join Date
    06-24-2013
    Location
    Jacksonville, FL
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Conditional formatting and use of OR

    Use the following formula (substituting for your cell/range as needed) in the 'Use a formula to determine which cells to format' field.

    =IF(OR(A1="",A1="n",A1="N"),TRUE)

    *edit: realized I had 1 too many end parentheses
    Last edited by Shazardred; 10-28-2015 at 03:01 PM.

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Conditional formatting and use of OR

    I selected column A for the conditional formatting.
    Conditional Formatting, New Rule, Use formula and enter this formula. "n" will cover both upper and lower case n.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Select the formatting that you want.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    584

    Re: Conditional formatting and use of OR

    Thank-you.

    I suspect that OR can only take two argument the, correct? Also the fact that the lower case handles both upper and lower is a pleasant surprise!

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Conditional formatting and use of OR

    OR isn't limited to two arguments. It can take up to 255 arguments.

  6. #6
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    584

    Re: Conditional formatting and use of OR

    Thanks - that means I must have messed up somewhere else something awful, but now I know where to look to start tracking it down. Is it correct as:

    Please Login or Register  to view this content.
    (with the "=" added for the Conditional Formatting example)?

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Conditional formatting and use of OR

    That's the way it goes. Separate each condition with a comma and all the conditions are surrounded by ()

+ 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. 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
  2. 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
  3. Replies: 3
    Last Post: 11-04-2013, 12:47 AM
  4. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  5. Conditional Formatting via VBA: Change formatting in range based on value of each cell
    By ralphjmedia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2013, 10:37 AM
  6. Delete Conditional Formatting conditions but keep cell formatting - Excel 2010
    By tetreama in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2012, 08:28 PM
  7. Replies: 3
    Last Post: 05-15-2012, 04:13 PM

Tags for this Thread

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