+ Reply to Thread
Results 1 to 4 of 4

Conditional Formatting more than 3 colors via vba

  1. #1
    Registered User
    Join Date
    04-06-2015
    Location
    Colorado
    MS-Off Ver
    2010
    Posts
    9

    Conditional Formatting more than 3 colors via vba

    First I'd like to say how much I appreciate this resource & all the help that has been provided.
    I'm new to this, but have been experimenting with creating macro's & vba.
    My problem is with conditional formatting more than 3 colors based on different cell values & text (doesn't always fill all the cells even when I adjust priority). I'd also like to do a couple text/date auto-fill functions based on the same info.

    Here's what I got:
    S3:U82 contain the conent that will determine fill
    S3:U82, G3:K82 all get color filled based on the content (same row)
    1) - =OR($S3<>0,$K3<>0,$L3<>0) (anything not equal to 0) fills same row with Yellow RGB (255, 255, 0)
    2) - S3:U82 ="" (blanks in any cell) fills same row with Orange RGB (247,150,70)
    3) - =SEARCH("Linear", $J3)>0 (Searches J3:J82 & fill over rides #2 Yellow) fills with Red RGB (255, 0, 0)
    5) - =SEARCH("LSA", $J3)>0 (Searches J3:J82 & fill over rides #2 Yellow) fills with Grey RGB (191,191,191)
    4) - =AND($S3=0,T3=0,U3=0) (all 3 rows in S3:U82 must each =0) fills with Green RGB (146, 208, 80)
    4a) - Stamps the day it was turned green in column J same row. (This will erase "Linear" & should turn row geen). Unsure how to do this. Today() always keeps current day, but I want the day it was turned green (or all 3 "0" that caused it to turned green).
    4b) - Places "Text" in column K same row. (Text will always be the same for any row)

    .Here's what the macro recorder gives for each, but I'm unsure how to incorporate all 5 together & to do the couple other functions I'm looking for. The conditional format just seems flaky & doesn't always take affect).
    Thanks to anyone that might be of help.


    Please Login or Register  to view this content.
    Last edited by FDibbins; 04-06-2015 at 12:24 PM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,603

    Re: Conditional Formatting more than 3 colors via vba

    AFAIK XL 2010 is not limited to three conditions ?

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Conditional Formatting more than 3 colors via vba

    HI, welcome to the forum

    My problem is with conditional formatting more than 3 colors based on different cell values & text (doesn't always fill all the cells even when I adjust priority).
    1. as mentioned above 2010 has far more than 3 rules.
    2. if it doesnt work when you adjust stuff, maybe you need to look at absoluting criteria?

    Suggest you upload a sample workbook

    Finally...Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I have added them for you - this time
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Conditional Formatting more than 3 colors via vba

    deleted duplicate post

+ 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 with colors
    By slacknoise in forum Excel General
    Replies: 3
    Last Post: 11-20-2014, 01:09 PM
  2. Conditional formatting for colors
    By ammartino44 in forum Excel General
    Replies: 1
    Last Post: 02-28-2014, 08:02 PM
  3. [SOLVED] Conditional Formatting Colors
    By FoxRacing1234 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-25-2013, 10:07 AM
  4. Conditional Formatting Colors
    By dmyoungsal in forum Excel General
    Replies: 3
    Last Post: 07-15-2008, 05:38 PM
  5. conditional formatting (need 10 colors)
    By dmyoungsal in forum Excel General
    Replies: 7
    Last Post: 07-15-2008, 08:58 AM

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