+ Reply to Thread
Results 1 to 3 of 3

Conditional Formatting To Colour Cells That Contain No Data

  1. #1
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Question Conditional Formatting To Colour Cells That Contain No Data

    I'm trying to figure out how to create conditional formatting for some cells in my workbook. I attached a sample of my situation.

    Basically, I need any cells in any given row in columns F through O to display the following colours based on the following specifications:

    Green, if the date at the end of the row in the Delivery Date column is more than 21 days from today's date.

    Yellow, if the date at the end of the row in the Delivery Date column is less than 21 days and more than 7 days from today's date.

    Red, if the date at the end of the row in the Delivery Date column is 7 days or less from today.

    If any of the cells in any given row already contain data, the formatting does not apply to those cells only.

    If there is no date in the Delivery Date, the formatting does not apply.

    I've been struggling with this for a while now. Any help would be awesome!
    Attached Files Attached Files
    There is so much good in the worst of us,
    And so much bad in the best of us,
    That it hardly behooves any of us
    To talk about the rest of us.

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Conditional Formatting To Colour Cells That Contain No Data

    assumption

    there is no blank cell from B2 down in that columns

    try this macro "cond_format"
    I am sending the file after running the macro.
    for retesting only macro "cond_format'
    park these two macroS "test" and "undo" in a new module to avoid confusion(I have done it in module 3)

    CHANGE NAME OF SHEET AS YOU LIKE
    KEEP SHEET 1 AS ACTIVE SHEET AND RERUN "COND_FORMAT"
    if necessary modify the code.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    I am not an expert. better solutions may be available
    [email protected]

  3. #3
    Forum Contributor swordswinger710's Avatar
    Join Date
    02-20-2008
    Location
    Bright, Canada
    MS-Off Ver
    2010
    Posts
    845

    Re: Conditional Formatting To Colour Cells That Contain No Data

    Thank you for your wonderful work, venkat1926.

    After much work on this, I've settled with the solution as shown in the attachment. It seems to work best for my situation. Thanks so much!
    Attached Files Attached Files

+ 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