+ Reply to Thread
Results 1 to 34 of 34

Apply conditional formatting to column A when date is entered in column B (adjacent cells)

  1. #1
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Apply conditional formatting to column A when date is entered in column B (adjacent cells)

    I have a spreadsheet that has three conditional formatting rules, and I would like to add a fourth/final rule as follows:

    When a date is entered into a cell in column B, the adjacent cell in column A should go from a red, orange or yellow background to white/no background.

    To explain, there are projects being entered into this spreadsheet with the target completion dates column A. Column A is conditionally formatted based on the date from "TODAY" as either red, orange or yellow, depending on its proximity to today's date/the date that the spreadsheet is opened.

    However, once the project is complete, the user enters the date it is completed in column B, and the formatting in column A should then automatically return to a white background.

    I am having trouble figuring out how to format this. Thank you

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    IN CF

    =B2=Finish date

    Fill=== No colour
    Last edited by JohnTopley; 01-16-2018 at 12:36 PM.

  3. #3
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    This did not work. Below are my steps - did I miss something?

    I highlighted column A (since this is where the formatting will be applied)
    Went to "Conditional Formatting"
    Selected "New Rule"
    Selected "Use a formula to determine which cells to format"
    Entered: =$B:$B=Completed
    Selected "No Color"

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    the formula should be:

    =$B2=Complete_date (Complete_Date is a reference to some cell containing a date) e.g =$b2=$Z$100 ($Z$100 has completion date)

    Then set "Applies to" the required range e.g B2:B10000 (NOT whole column)

  5. #5
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    I am sorry, but it is not working when I use: =$B2=Complete_date

    Also, isn't the range in column A?

    When I enter a date in cell B2, then the date in cell A2 should go from being a color to white. When I enter a date in cell B3, the date in cell A3 should go from being a color to white.

    A B
    row TARGET COMPLETED
    2 01/2/2018 (say this is CFd yellow) 12/28/2017 (now that this date is entered, the CF in A2 should turn to white)
    3 11/1/2017 (say this is CFd orange) 12/30/2017 (now that this date is entered, the CF in A3 should turn to white)

  6. #6
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    When a date is entered into column B for the particular record identified by row, column A in that same row recognizes it by changing the cell color.

    This seems so easy, but I am apparently missing something.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    Attach a sample workbook (not image).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  8. #8
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    I have attached a sample spreadsheet. Thank you!
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    I assume that the actual completion date in col B might not be the same as the target completion date in col A. If there will be nothing in col B before the project is finished, then what you need to check for is the presence of a date in col B.

    Try this:
    1. Select the range you want the CF to apply to (A2:A1000) or whatever it is - col A not col B.
    2. Conditional FormattingNew RuleUse a formula to determine which cells to format.
    3. Formula:
    =ISNUMBER($B2)
    4. Format with No Fill (or White, if you prefer).

    Edit: see my next post taking account of your sample file
    Last edited by Aardigspook; 01-16-2018 at 05:06 PM.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  10. #10
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    Follow-up to my last post after seeing your sample file.

    1. Select your range in column B (B2:B16 in your file)
    2. same as previous post
    3. Formula:
    =ISNUMBER($C2)
    4. same as previous

    If you then go to Conditional FormattingManage Rules, you can change the Applies to to whatever your actual range is (B2:B100 or whatever).

    Hope that helps.

  11. #11
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    Thank you so much for this formula. It works in my sample spreadsheet, however, it does not work in my original spreadsheet and I will try to explain what I found after troubleshooting.

    Column B contains Target Dates and Column C contains Completed Dates. Each row contains an individual project - one row one project.

    When I use this formula in my original spreadsheet, this is an example of what happens:

    Cell B2 contains a Target Date, which once I enter a Completed Date in cell C2, the conditional formatting for Cell B2 should change to white/no color.
    Cell B3 contains a Target Date, which once I enter a Completed Date in cell C3, the conditional formatting for Cell B3 should change to white/no color.
    Cell B4 contains a Target Date ...

    Using the formula you provided, when I enter a completed date in cell C2, nothing changes in cell B2. However, if I enter a completed date in cell C6, for whatever reason that date entry is recognized and changes cell B2 to no color/white. Because cell C6 is a different project, it should not affect cell B2, only cell C2 should prompt the conditional formatting change.

    I am not sure why this is happening, but any assistance would be greatly appreciated.

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    Attach a sample workbook (not image).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  13. #13
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    It sounds like cell references are a bit messed up somehow. Try doing the CF on one cell only, then extending the Applies to range.

    1. Select cell B2 only.
    2. Apply CF, formatted with no fill, with this formula:
    =ISNUMBER(C2)
    3. Click Conditional FormattingManage Rules.
    4. For the rule you just created, in the Applies to box, the range should read just =$B$2. Change this to =$B$2:$B$100 (amend the $100 part to the number of rows you need).

    Does that do it?

  14. #14
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    Still doing the exact same thing - it is working, but looking at the wrong row. So, I enter a date completed into cell C23 and it changes the conditional formatting to white in cell B18 when it should be changing the status for cell B23 (next to cell C23). Any thoughts?

  15. #15
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    I did not see any information in your reply, and thought that perhaps my sample spreadsheet did not properly attach so I am sending it again. Thank you
    Attached Files Attached Files

  16. #16
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    As requested, post your file. I suspect the problem is that referred to in post #13.

    EDIT: file posted!

  17. #17
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    I replied actually stating that the advice in post #13 did not work - it is still reading the incorrect row. Any additional thoughts as to why?

  18. #18
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    Your sheet works: put =TODAY() against any highlighted column B and the colour is now "no colour"

    Delete the dates and the colour is re-instated.

  19. #19
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    What do you mean put =TODAY() against any highlighted column B ?

  20. #20
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    Enter Today's date in C) just to trigger the CF.

  21. #21
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    What does the actual formula look like then?

  22. #22
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    Just enter any date ( or NUMBER) in a cell in column C

  23. #23
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    I don't understand - when I enter a date in a cell in column C, the adjacent cell in column B does nothing.

    This is what I have in terms of a formula per your suggestion in cell B2

    ISNUMBER(C2)

    with "No Color" as the formatting.

    Do I need to change any of this?

  24. #24
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    See attached row 12 (as example)

    C12 has =TODAY()
    Attached Files Attached Files

  25. #25
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    It is definitely working in this sample spreadsheet, but not in my working spreadsheet that is much larger. I have edited/scrubbed my original which has many more rows. I am looking to see if there is a formatting issue that I am overlooking, but am also attaching it to show you in case you can help me.
    Attached Files Attached Files

  26. #26
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    It's because you're starting on row 5. Change the rule from =ISNUMBER($C2) to =ISNUMBER($C5). Also, in Manage Rules, move the rule to the top of the list so it takes priority over the other rules.

    Edit: I've attached your file with the changes made - also with screenshots of the rules.
    Last edited by Aardigspook; 01-18-2018 at 10:02 AM.

  27. #27
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    See attached with corrections applied as per Aardigspook's post
    Attached Files Attached Files

  28. #28
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    Thank you for the sample that you mocked up. The formulas are working in that spreadsheet, but not when I enter it into my original spreadsheet - ugh!

    I have gone through the original spreadsheet removing formatting and redoing it, etc., and nothing seems to work. There has got to be something embedded in it that is keeping the last condition (completion date) from working.

    I don't know if you have any ideas about this, but I am going to keep trying to figure it out.

    Thank you

  29. #29
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    Select the first cell in column C that has the date e.g C4. then in CF

    formula

    =ISNUMBER($C4)


    FORMAT...FILL.."No Colour"

    then set "Applies to" to $C$4:$C$1000 or whatever your range is.

  30. #30
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    Column B is the column with the Target Dates that are conditionally formatted based on their distance from "TODAY"'s date.

    Column C is the column with the Completion Dates in which once a completion date is enter, the target date in column B should now have "no color."

    Are you saying that I should be conditionally formatting column C (completion date) with a formula to remove the color in column B (target date) instead of the other way?

  31. #31
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    omg - I think the problem is that I am assigning "no color" to the formatting. I tried using a light blue, and it seems to be working in my original spreadsheet.

  32. #32
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    There is a little 'trick' with assigning 'No fill' as the colour in CF - you have to actually click the No color button, even though it looks like it's already clicked. When you click it, the Clear button at the bottom right will no longer be greyed out. If you don't do this, then the CF doesn't apply any format, so it won't work - I think this is maybe what's been happening.
    I've re-attached your sample sheet, with step-by-step instructions with screenshots to the side of the data - hopefully that will show you what I mean.

  33. #33
    Forum Contributor
    Join Date
    05-01-2013
    Location
    Richmond, VA
    MS-Off Ver
    Excel 365
    Posts
    164

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    Unfortunately that is not the issue, because I have actually clicked the "No Color" option in that screen. That said, it works in the sample, which is great, but not in my production sheet but the light blue is a decent option. Thank you so very much for your great help!

  34. #34
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Apply conditional formatting to column A when date is entered in column B (adjacent ce

    If you're happy with the light blue, that's great. I'm glad we were able to help, though apologies that we couldn't get it to work exactly how you wanted it - I'm sorry to say I'm out of ideas now!

    If you are now happy with it, please mark the thread as Solved so that others can see there's an answer here (instructions are in my sig). Thank you.

+ 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. Conditional Formatting apply to 1 Column
    By lexusap in forum Excel General
    Replies: 7
    Last Post: 06-11-2017, 01:53 AM
  2. [SOLVED] Codes to Apply Conditional Formatting on Entire Column
    By chasoe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-08-2015, 12:21 AM
  3. [SOLVED] Need formula to cancel conditional formatting when a date is entered in another column
    By hbiglay in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-19-2014, 02:53 PM
  4. Conditional Formatting one column if another column has date entered
    By sunnyfield in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-27-2013, 11:08 PM
  5. Replies: 5
    Last Post: 07-12-2013, 01:15 AM
  6. Replies: 5
    Last Post: 02-28-2012, 04:47 PM
  7. How to apply conditional formatting to a whole column
    By scottghansen79 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-05-2010, 05:21 AM

Tags for this Thread

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