+ Reply to Thread
Results 1 to 17 of 17

Conditional Formatting

  1. #1
    Registered User
    Join Date
    03-20-2017
    Location
    Glasgow
    MS-Off Ver
    2003 and 2010
    Posts
    13

    Conditional Formatting

    Hi,

    I have a spreadsheet which contains a list of dates when training was completed and the date each course expires. The expiry is shown as a number od days (eg 3 years is 365*3)

    What I am trying to do is apply Conditional Formatting whereby the cell will turn red when the date shown as completed has exceeded the renewal period. That is, with a completed date of 19 August 2013 and an expiry date of +1095 days (3 years), how do I get the cell to show red when the expiry date is greater than 19 August 2013 + 1095 days (3 years)?

    I have been going around in circles with this one and I will be grateful for your help.

    Thanks

    Stuart

  2. #2
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    =A1>(your_date+your_days)

  3. #3
    Registered User
    Join Date
    03-20-2017
    Location
    Glasgow
    MS-Off Ver
    2003 and 2010
    Posts
    13
    Quote Originally Posted by sandy666 View Post
    =A1>(your_date+your_days)
    Thank you for your speedy reply.

    In your reply, will cell A1 be todays date?

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    I don't know what should be in A1 it's up to you
    format should be like this (or similar): =A1>DATE(2013,08,119)+1095 if you want A1 colored.
    check it with less days, like: A1>DATE(2017,03,10)+2 and type in A1: 15/03/2017 then change to 11/03/2017

  5. #5
    Registered User
    Join Date
    03-20-2017
    Location
    Glasgow
    MS-Off Ver
    2003 and 2010
    Posts
    13

    Re: Conditional Formatting

    Thanks again for your reply but I remain confused.

    The attachment shows a 2 column table.

    The 1095 figure is 3 years (365*3)In the working spreadsheet I have 20 courses and each expiry date will be added in the same manner.

    In this extract I want to apply Conditional Formatting so all entries where the date shown plus 3 years is before todays date. That is, the course has expired and needs to be redone.

    Hope this makes it easier for you to explain.
    Attached Files Attached Files
    Last edited by Stuwoolf; 03-20-2017 at 08:18 AM.

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    You've Excel 2010 so change fiile format to xlsx and reattach again

  7. #7
    Registered User
    Join Date
    03-20-2017
    Location
    Glasgow
    MS-Off Ver
    2003 and 2010
    Posts
    13
    Quote Originally Posted by sandy666 View Post
    You've Excel 2010 so change fiile format to xlsx and reattach again
    I'm at work and use 2003.....I know ancient or what

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    All cells with dates should be red except last: 20/03/2016 20/03/2019
    =TODAY()>($B3+1095)
    is that what you want?
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    03-20-2017
    Location
    Glasgow
    MS-Off Ver
    2003 and 2010
    Posts
    13

    Re: Conditional Formatting

    I worked out this formula =$B$3+$B$2<$A$2, where $B$3 is the date the course was completed, $B$2 is 1095 and $A$2 is TODAY()

    This seems to work and I think it is as you have shown in your last reply.

    The question now is how do I apply this to the whole column. Must I input the formula for each cell for the Conditional Formatting to work? I do hope not.........

    Thanks again for your help with this.

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    which column?
    btw. all cells in column from start to an end??? or any range?

  11. #11
    Registered User
    Join Date
    03-20-2017
    Location
    Glasgow
    MS-Off Ver
    2003 and 2010
    Posts
    13

    Re: Conditional Formatting

    Looking at your example, it differs from what I did in that I did not include a result date (that is, Date Completed + 1095. I did this in my formula).

    I want to add the Conditional Formatting to the column with all my Date Completed data. I have tried to use B3:B9 but it didn't work.

    I think we are getting there. Thanks again.

  12. #12
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    If your column which should be colored is B, select range in B column from first cell with date to the last cell where date will be, next use Conditional Formatting
    and put there this one: =TODAY()>($B3+1095) (if the first cell of your range is B3. Or use your formula but I really don't know what are you doing there without example which reflect structure of your real data.
    E.g. if range is one column range enough to use first cell (B3 in this case) but if you want range eg. A1:D10, then select range and in CF use first top left cell ie. $A1 if you want columns colored or A$1 if you want rows colored. But this is theory

    btw. you can delete dates from C column in example file

    OK,
    If the basic problem is solved
    - it's always a good practice to show respect to the person(s) who have helped you
    - is a click on the Add Reputation first (left lower corner of the post of person(s) who helped you) and then
    - mark the thread as SOLVED (top right corner over your first post - Thread Tools). This is important for all of us,

    Thanks
    Last edited by sandy666; 03-20-2017 at 09:31 AM.

  13. #13
    Registered User
    Join Date
    03-20-2017
    Location
    Glasgow
    MS-Off Ver
    2003 and 2010
    Posts
    13

    Re: Conditional Formatting

    Thank you for your assistance with this. I think with your help the issue is resolved.

    On the same spreadsheet I know have a similar problem.

    My spreadsheet (attached to this message) contains COUNTIF and some Conditional Formatting.

    At Rows 29 and 30 the COUNTIF formula calculates the number of courses passed. However sometimes this will go out of date and should not be shown in this total.

    I tried this but it doesn’t work

    =COUNTIF(B4:B16,">0") AND (TODAY()>B4:B16+$B$2)

    How do I set a formula which will only count those courses which are in date?

    Grateful for any help.
    Attached Files Attached Files

  14. #14
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    try:
    B29: =COUNTIF($B$4:$B$16,">"&SUMPRODUCT($B$4:$B$16*(TODAY()>($B$4:$B$16+$B$2))))
    B30: =COUNTIF($B$19:$B$27,">"&SUMPRODUCT($B$19:$B$27*(TODAY()>($B$19:$B$27+$B$2))))
    Attached Files Attached Files
    Last edited by sandy666; 03-23-2017 at 07:50 AM.

  15. #15
    Registered User
    Join Date
    03-20-2017
    Location
    Glasgow
    MS-Off Ver
    2003 and 2010
    Posts
    13

    Re: Conditional Formatting

    Quote Originally Posted by sandy666 View Post
    try:
    B29: =COUNTIF($B$4:$B$16,">"&SUMPRODUCT($B$4:$B$16*(TODAY()>($B$4:$B$16+$B$2))))
    B30: =COUNTIF($B$19:$B$27,">"&SUMPRODUCT($B$19:$B$27*(TODAY()>($B$19:$B$27+$B$2))))
    Excellent!

    Thank you so much. Without your help I would never have been able to get this right.........I haven't even heard of &SUMPRODUCT....

    Thank you.

  16. #16
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    You are welcome
    Thanks for rep and marking thread as solved.

  17. #17
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Conditional Formatting

    Additional solution:
    If you want you can use
    B29: =IF(ISNUMBER(B$2),COUNTIF(B$4:B$16,">"&SUMPRODUCT(B$4:B$16*(TODAY()>(B$4:B$16+B$2)))),COUNTIF(B$4:B$16,">0"))
    B30: =IF(ISNUMBER(B$2),COUNTIF(B$19:B$27,">"&SUMPRODUCT(B$19:B$27*(TODAY()>(B$19:B$27+B$2)))),COUNTIF(B$19:B$27,">0"))
    and drag both to the right

+ 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: 1
    Last Post: 12-08-2016, 03:14 PM
  2. Conditional Formatting Removing Previous Conditional Formatting?
    By CravingGod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-04-2016, 01:02 PM
  3. Replies: 6
    Last Post: 01-08-2016, 06:44 PM
  4. 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
  5. Replies: 1
    Last Post: 09-20-2013, 06:23 PM
  6. 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
  7. 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