+ Reply to Thread
Results 1 to 4 of 4

Conditional Formating

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

    Conditional Formating

    Hello:

    Please refer to attached file.

    I need to apply the conditional formatting as explain below.

    I have data in Cell B3:K12 which shows if the task listed in column A are completed or not ( 1 mean completed, 0 mean not completed)
    It's 12 digit number consist of 0 and 1.
    Each digit is referring to each month of the year.
    (1st digit is for Jan, 2 for Feb .....12th for Dec)

    Basically 1 means task is completed and 0 means task is incomplete

    So Example :

    A3 = 111000000000 means task for task#1 for Jan,Feb and Mar are completed and Apr thru Dec not completed.

    Based on Current month which is in cell C1 (April), all task upto Mar should have been completed.
    So all numbers should be 111000000000.

    I need to highlight all task which has been completed Green.
    The task which are not completed needs to be highlighted Red.

    If current month is May then for quality all task completed the number would be 111100000000 and then apply CF accordingly.


    Let me Know if you have any questions.
    Thanks.
    Riz
    Attached Files Attached Files
    Last edited by rizmomin; 04-23-2014 at 07:08 PM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,077

    Re: Conditional Formating

    Try

    Select B3
    =(LEFT(B3,$C$1)=REPT("1",$C$1))
    format as Green

    Select B3
    =(LEFT(B3,$C$1)<>REPT("1",$C$1))
    format as Red

    Use Format Painter to copy to the other cells

    This assumes that if Jan Feb Mar or Apr are incomplete and we are in May then the result is incomplete (because Jan Feb Mar or Apr is not complete yet)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  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 Formating

    Here is another option
    1. format all cells green (then you only nered 1 rule)

    2. highlight the range you want to apply the conditional formatting to
    3. on the home tab, styles, select CF
    4. select new rule, select use formula
    5. enter =LEN(SUBSTITUTE(B3,0,))<>MONTH($B$1)-1 format fill RED

    If you feel the need to CF the cells that are correct (instead of formatting all cells green)...
    6. repeat 4 and 5 with...
    =LEN(SUBSTITUTE(B3,0,))=MONTH($B$1)-1 format fill GREEN
    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
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Conditional Formating

    Hello Special-K:

    Thanks a lot for great help.
    Your formula works great.
    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: 5
    Last Post: 03-14-2014, 04:03 AM
  2. Replies: 4
    Last Post: 01-23-2014, 10:14 AM
  3. Replies: 6
    Last Post: 08-14-2006, 05:00 PM
  4. Replies: 2
    Last Post: 03-27-2006, 12:10 PM
  5. Install dates formating using conditional formating?
    By Jerry Eggleston in forum Excel General
    Replies: 2
    Last Post: 11-09-2005, 01:49 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