+ Reply to Thread
Results 1 to 3 of 3

Help me use OR in conditional formatting better

  1. #1
    Registered User
    Join Date
    08-29-2014
    Location
    New Jersey
    MS-Off Ver
    Mac 2011
    Posts
    5

    Help me use OR in conditional formatting better

    First, I'm sorry if this is somewhere else or if I should already know this!

    I'm conditionally formatting a data array to highlight certain rows based on data in three columns.

    Column one, easy, >100
    Column two, easy, isblank()
    Column three however can have multiple acceptable answers.

    So heres the formula I'm using:
    =AND($F20>100,,ISBLANK($J20),OR($G20=124,$G20=125,$G20=126,$G20=127,$G20=128,$G20=132))

    Do I have to write out the final statement as such or is there a shortcut way to write out the numbers? like or($G20=124,125,126,127 etc..)

    Because the numbers are not sequential I can't use the 124:128 or whatever. So is there something better?

    Thanks!

  2. #2
    Valued Forum Contributor
    Join Date
    04-22-2014
    Location
    Auckland, New Zealand
    MS-Off Ver
    Office 365 (work) and Excel 2013 (home)
    Posts
    1,167

    Re: Help me use OR in conditional formatting better

    You need to do it the way you have, but it could be written like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This assumes G20 contains whole numbers only, and won't be something like 125.6.
    Please add reputation by clicking on the * if I have helped.
    Please mark the thread SOLVED if your issue has been resolved.
    Thanks, Glenn.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,446

    Re: Help me use OR in conditional formatting better

    Maybe this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    could be shortened a little to:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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: 1
    Last Post: 09-20-2013, 06:23 PM
  4. 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
  5. Replies: 3
    Last Post: 05-15-2012, 04:13 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