+ Reply to Thread
Results 1 to 7 of 7

Conditional Format Cell based on Dates in Other Cells

  1. #1
    Registered User
    Join Date
    04-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    Conditional Format Cell based on Dates in Other Cells

    Guru's,

    Need help in doing conditional formatting based on data in other cells. Basically, Column A is a list of Cell Sites, Columns B and C would contain either dates tasks were completed on site, or be blank. I want to Conditional Format Column A to shade cell and font 1 color if only B or C has a date or another color if BOTH B and C have a Date.


    "A" "B" "C"
    ID Date 1 Date 2
    1234
    1235 4/2/2013
    1236 1/22/2013
    1237 1/23/2013 4/4/2013

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,474

    Re: Conditional Format Cell based on Dates in Other Cells

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  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
    52,917

    Re: Conditional Format Cell based on Dates in Other Cells

    Hi and welcome to the forum

    If you only want to test if either B OR C contains a date or B AND C contain dates, then

    1. highlight the range you want to apply the conditional formatting to
    2. on the home tab, styles, select CF
    3. select new rule, select use formula
    4. enter =COUNT(B3:C3)=1 this will be for only 1 date in either B or C

    Repeat 3 and 4 with =COUNT(B3:C3)=2 this will be for a date in BOTH B or C

    If you want to test for ONLY B or ONLY C, then replace the 1st rule with these instead...
    =B3<>""
    =C3<>""
    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
    Registered User
    Join Date
    04-18-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Conditional Format Cell based on Dates in Other Cells

    CF_Help.xlsx

    I tried FDibbins steps and didn't seem to work. Attached is a sample spreadsheet of what we are trying to accomplish.

  5. #5
    Registered User
    Join Date
    04-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Conditional Format Cell based on Dates in Other Cells

    Quote Originally Posted by kzernel View Post
    Attachment 229374

    I tried FDibbins steps and didn't seem to work. Attached is a sample spreadsheet of what we are trying to accomplish.
    Anyone given this a shot yet with the sample spreadsheet?

  6. #6
    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
    52,917

    Re: Conditional Format Cell based on Dates in Other Cells

    1. Highlight A2:A6
    2. on the home tab, styles, select CF
    3. select new rule, select use formula
    4. enter =OR(B2>0,C2>0) format fill yellow

    repeat 3 & 4 using =AND(B2>0,C2>0) and format fill pink
    repeat 3 & 4 using =AND(B2>0,C2>0,D2>0) and format fill green
    make sure that the rules are in this order...
    green - pink - yellow
    if they are not, put them in that order using the up/down arrows

  7. #7
    Forum Contributor Bhuvi's Avatar
    Join Date
    04-19-2013
    Location
    Delhi, India
    MS-Off Ver
    MS Excel 2003,07,10
    Posts
    153

    Re: Conditional Format Cell based on Dates in Other Cells

    Go to Home >> Conditional Formatting >> New Rule >> Use a formula to determine...

    1. for "Condition: B or C has a value" put the below formula in the formulas section and give the range $A$2:$A$5-
    =IF(OR(ISBLANK(B2)=TRUE,ISBLANK(C2)=TRUE),"True","False")

    2. for "Condition: B and C has a value" put the below forumla and give range $A$2:$A$5 -
    =IF(AND(ISBLANK(B2)=FALSE,ISBLANK(C2)=FALSE),"True","False")

    3. for "Condition B and C and D has a value" put the below formula and provide the same range
    =IF(AND(ISBLANK(B2)=FALSE,ISBLANK(C2)=FALSE,ISBLANK(D2)=FALSE),"True","False")

    Select the desired color for each condition.

+ 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