+ Reply to Thread
Results 1 to 8 of 8

Conditional Formatting with VBA

  1. #1
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Conditional Formatting with VBA

    I would like to format using VBA.
    If the cell "B1" is greater today then the range "B1: B6" will be the color green.


    If the cell "C1" then today is greater than the range of "C1: C6" will be the color Yellow.


    If the cell "D1" then today is greater than the range of "D1: D6" will be the color blue.

    Thanks
    Last edited by marreco; 01-14-2012 at 07:45 PM.

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Conditional Formatting with VBA

    try this
    Please Login or Register  to view this content.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Conditional Formatting with VBA

    I guess the obvious question, why not just use the built-in conditional formatting?
    HTH
    Regards, Jeff

  4. #4
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Conditional Formatting with VBA

    Perfect! thank you!

  5. #5
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Conditional Formatting with VBA

    hello jeffrey brown, my goal is to learn to use a little VBA.

    I would love to learn.

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,327

    Re: Conditional Formatting with VBA

    Nothing wrong with that

    You might find this useful...

    http://www.mrexcel.com/forum/showpos...97&postcount=5

  7. #7
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Conditional Formatting with VBA

    if you want lern look at this below, colors little different but code looks better
    Please Login or Register  to view this content.

  8. #8
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: Conditional Formatting with VBA

    And if I could get would be as automatic?

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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