+ Reply to Thread
Results 1 to 6 of 6

Conditional formatting using VBA

  1. #1
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Conditional formatting using VBA

    I am trying to get code to apply a red fill in cells in columns B:C until last cell when the date < Today & Columns D until last cell if the column does not contain an "@" symbol, I am working with excel 2003 and cannot have numerous conditional formats so I need VBA to do it, Can anyone point me in the right direction?

  2. #2
    Registered User
    Join Date
    02-13-2013
    Location
    Bergen County
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Conditional formatting using VBA

    Burt,

    which column has the date B or C or is it both?

    thanks,
    fonzie

  3. #3
    Registered User
    Join Date
    02-13-2013
    Location
    Bergen County
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Conditional formatting using VBA

    Hi Burt,

    Try this code and let me know if this works for you.

    Please Login or Register  to view this content.
    thanks,
    fonzie
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Conditional formatting using VBA

    Another option:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Donemana, NI
    MS-Off Ver
    Excel 2007
    Posts
    386

    Re: Conditional formatting using VBA

    Fonzie29,
    Thanks for the great code but I am experiencing a few problems, I had to move the cell references and sheet name and now the code will only work down as far as row 13? Can you have a look at this and see if you can find out what is wrong, I also need an adjustment so that the formatting colour's in the cells which have " / /" displayed. I have attached a copy of the sheet for reference.
    Johnny
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-13-2013
    Location
    Bergen County
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: Conditional formatting using VBA

    Hi Burt,

    I followed your guidelines from your first post by filling the cells in red if they are less than today's date, blank or has " / / ", I did this for the 3 columns that have dates. For the email column any cells that are blank, "none" or is missing "@" symbol if filled them in red as well. In addition I also had to format the dates through a function since they were formatted as text which makes it tricky to work with. Please let me know what you think, and please if you are satisfied could kindly provide feedback by adding reputation i would appreciate it.

    Please Login or Register  to view this content.
    Thanks, Fonzie
    Attached Files Attached Files
    Satisfied? Click the * below to Add Reputation

+ 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. 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
  2. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  3. Replies: 2
    Last Post: 09-19-2013, 10:34 AM
  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