+ Reply to Thread
Results 1 to 5 of 5

Adding 3 Conditional Format Conditions to a Cell Programmatically

  1. #1
    Forum Contributor
    Join Date
    05-02-2012
    Location
    Mosselbaai, Suid Afrika
    MS-Off Ver
    Excel 2016
    Posts
    107

    Adding 3 Conditional Format Conditions to a Cell Programmatically

    How can I add 3 Conditional Format Conditions to a Cell or Cells Programmatically?
    Conditional Formatting.GIF

    I want to add the conditional formatting as indicated in the attached picture with VBA.

    Could you please help with this.

    Thank you.

    Regards,
    Henk

  2. #2
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Adding 3 Conditional Format Conditions to a Cell Programmatically

    Start the Macro Recorder and then setup the conditional formatting manually. Then Stop the Macro Recorder and check the code (Alt-F11)
    Click on the star if you think I helped you

  3. #3
    Forum Contributor
    Join Date
    05-02-2012
    Location
    Mosselbaai, Suid Afrika
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Adding 3 Conditional Format Conditions to a Cell Programmatically

    Hi adyteo,

    That is the very first thing I did, and it didn't work. It does not add the second and third conditions (in the code), neither does it add the priority, nor whether it should stop when a condition is true.

    Regards,
    Henk

  4. #4
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Adding 3 Conditional Format Conditions to a Cell Programmatically

    You would need to change the colors and criteria for each condition but here is an example of multiple conditional formatting:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    05-02-2012
    Location
    Mosselbaai, Suid Afrika
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Adding 3 Conditional Format Conditions to a Cell Programmatically

    Thanks adyteo, that will do, appreciated!

    Regards,
    Henk

+ 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. Conditional Formatting - Adding Multiple Conditions
    By stuu3270 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 01-10-2013, 02:00 PM
  2. programmatically adding both normal and formatted text into the same cell
    By stef123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-13-2007, 01:08 PM
  3. Conditional Formatting 4+ conditions, format rows based on cell
    By nockam in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-12-2006, 06:12 PM
  4. Change the format of a cell Programmatically
    By Bergfe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-29-2006, 08:40 AM
  5. Adding in another conditional format on the same cell
    By Kelly Lim in forum Excel General
    Replies: 4
    Last Post: 05-23-2005, 05:06 AM

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