+ Reply to Thread
Results 1 to 6 of 6

VB Code for Conditional Formating on Font

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code for Conditional Formating on Font

    Hello:

    Please refer to attached file.
    I have data in cell B2:K11
    Each cell consist of 12 digits with 1 and 0.
    I need to see if digit 1 can have one color font (yellow) and 0 can have other color font (light Orange).

    (Either VB Code or Formula would work for me)

    Let me Know if you have any questions.
    Thanks.
    Riz
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: VB Code for Conditional Formating on Font

    Hi,
    maybe something like this

    Please Login or Register  to view this content.
    If you are pleased with a member's answer then use the Star icon to rate it.

  3. #3
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code for Conditional Formating on Font

    Hello:

    I am not sure how to use (Optional rng As Range = Nothing).

    Can you please add the code in the attached file and then I will be able to understand and implement according to my need.
    Thanks a lot

    RM

  4. #4
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: VB Code for Conditional Formating on Font

    Hi,
    you can use it like this:

    Please Login or Register  to view this content.
    Regarding
    Please Login or Register  to view this content.
    this makes the argument rng optional, i.e.
    Please Login or Register  to view this content.
    is correct statement and rng will be set to ActiveCell within the sub.

  5. #5
    Forum Expert
    Join Date
    06-25-2009
    Location
    Sofia, Bulgaria, EU
    MS-Off Ver
    Excel 2003-2013
    Posts
    1,290

    Re: VB Code for Conditional Formating on Font

    Actually, you must also play with rgb values, to find the colors you need, right now they are red and light yellow

  6. #6
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code for Conditional Formating on Font

    Hi Buran:

    Superb help.
    Thanks a lot!!!
    Riz

+ 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. Replies: 4
    Last Post: 03-05-2014, 08:53 AM
  2. [SOLVED] Conditional Formating from Color Code Table
    By mycon73 in forum Excel General
    Replies: 16
    Last Post: 11-23-2013, 12:42 AM
  3. Custom Conditional Formating with code Messes up with my VBA scripts
    By evakotsi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-21-2012, 01:10 PM
  4. 'Conditional Formatting' CODE to change Font Size
    By trickyricky in forum Excel General
    Replies: 5
    Last Post: 03-26-2011, 12:58 PM
  5. TextBox Conditional Formating code not working
    By caliskier in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-23-2011, 08:42 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