+ Reply to Thread
Results 1 to 26 of 26

excel using conditional formatting

  1. #1
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    excel using conditional formatting

    I have a spread sheet that shows dates when people have been assessed to be fit to carry out exercise I want to be able to put dates into a cell that are older than today e.g. 07.07.2013 and it turns the cell green then 11 months from that date the cell turns yellow and 12 months from date cell turns red. I can get conditional formatting to do this from the present date but not from older dates any help would be gratefully appreciated
    07,. 07. 2013 = Green
    07.06. 2014 =Yellow
    07.07.2014 = Red

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,759

    Re: excel using conditional formatting

    use three conditions and make sure you order RED 1st ,then Yellow ,then green

    =cell with date < date(year(today()), month(today())-12, day(today()))
    - thats red

    =cell with date < date(year(today()), month(today())-11, day(today()))
    - thats yellow

    =cell with date <= today()
    - thats green

    for 2007 or 2010 excel version
    Conditional Formatting

    Highlight applicable range >>
    cell with the date in

    Home Tab >> Styles >> Conditional Formatting
    New Rule >> Use a formula to determine which cells to format
    Edit the Rule Description: Format values where this formula is true:

    one of the formulas from above

    Format… [Number, Font, Border, Fill]
    choose the format you would like to apply when the condition is true
    OK >> OK

    repeat for other formulas - order so its red,yellow,green and use stop if true
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: excel using conditional formatting

    I tried the Formula's but got the following error message, I pasted the conditions you provided just to make sure they where correct. Thank you for your help and any further suggestions would be gratefully accepted.


    You may not use unions, intersections, or array constants for conditional formatting criteria

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,759

    Re: excel using conditional formatting

    do you want to attach a sample spreadsheet

    see example attached
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: excel using conditional formatting

    example excel pre exercise and risk assesment register for help.xlsx

    Hi I have attempted to attach a file I will try again but not having much look. if I manage to get to you it explains what I am trying to doAttachment 313132example excel pre exercise and risk assesment register for help.xlsx

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,759

    Re: excel using conditional formatting

    you need to apply to the range of cells E5:E14
    and change the order to be red, yellow, green and use stop if true

    also
    in D

    the conditional formatting is for all future dates
    =AND($D5>EDATE(TODAY(),12))
    D5 has to be greater than

    the number of months after the start date
    =EDATE(TODAY(),12)
    is 21/4/15
    and so D5 has to be greater than that, and so in the future

  7. #7
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: excel using conditional formatting

    =AND($D5>EDATE(TODAY(),12)) = Red
    =AND($D5>TODAY(),$D5>EDATE(TODAY(),11)) = yellow
    =$D5>TODAY() = Green

    All the formulas start from current date I would like to be able to insert any date and the formula to start counting from their. Do I have to use new formulas or can these be adapted for what I require. Can you have a look and Help thank you

    Quote Originally Posted by etaf View Post
    you need to apply to the range of cells E5:E14
    and change the order to be red, yellow, green and use stop if true

    also
    in D

    the conditional formatting is for all future dates
    =AND($D5>EDATE(TODAY(),12))
    D5 has to be greater than

    the number of months after the start date
    =EDATE(TODAY(),12)
    is 21/4/15
    and so D5 has to be greater than that, and so in the future

  8. #8
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,759

    Re: excel using conditional formatting

    sorry not sure i understand - can you give a few examples of what dates you want to enter and what colour you expect to get

  9. #9
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: excel using conditional formatting

    Quote Originally Posted by etaf View Post
    sorry not sure i understand - can you give a few examples of what dates you want to enter and what colour you expect to get
    I will attach a example fileexample excel pre exercise and risk assesment register for help.xlsx

    =AND($D5>EDATE(TODAY(),11)) = Red
    =AND($D5>TODAY(),$D5>EDATE(TODAY(),10Attachment 313157)) = yellow
    =$D5>TODAY() = Green

    The dates will be from 2013 and 2014> on wards the cells to go to the colours above when reaching the set dates.
    All the formulas start from current date I would like to be able to insert any date and the formula to start counting from their. Do I have to use new formulas or can these be adapted for what I require. Can you have a look and Help thank you
    Attachment 313157

    The file example excel pre exercise and risk assessment register20.xlsx (20.4 KB)is the file I am trying to make work Thank you for any help

  10. #10
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,759

    Re: excel using conditional formatting

    really sorry not getting this

    so for 2013 /2014
    if the date is older than 1 year from today - turn red
    =EDATE(TODAY(),-12)
    will give a date of 21/4/13
    now if you want the cell to be red use
    D5<EDATE(TODAY(),-12)
    which means the date in the cell is less then a year ago

    for 2015/16
    if you want it to also turn red if the date is greater than a year in the future
    D5>EDATE(TODAY(),12)

    for BOTH
    if you want it to also turn red if the date is greater than a year in the future OR the date is older than a year ago
    =OR(D5<EDATE(TODAY(),-12), D5>EDATE(TODAY(),12))

    is that what you mean ?

  11. #11
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: condtional formatting

    I get error message can not attach file so thank you for your help, I will have to seek help elsewhere thank you again

  12. #12
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,759

    Re: condtional formatting

    I will have to seek help elsewhere thank you again
    Ok

    but if you want to continue here
    how big is the file you are trying to upload

  13. #13
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: condtional formatting

    20.1kb I keep getting the message you do not have permission to do this refresh page and log in. thank you anyway.

  14. #14
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,759

    Re: condtional formatting

    you could use a internet sharing site for example

    dropbox or Onedrive (skydrive) or other site
    and post the link
    OR if you want to I can give my email address via a PM here

  15. #15
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

  16. #16
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: condtional formatting

    the files have been added hopefully you can see them and help me thank you

  17. #17
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,759

    Re: condtional formatting

    can you perhaps give a range of both the dates for the colours
    22/4/14 today

    so what date ranges are RED, YELLOW GREEN

    i'm signing off now for the night

  18. #18
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: condtional formatting

    the date ranges are

    Green date to 10 months from start date

    Yellow from 10 months to 11 months from start date

    Red from 11 months to 12 months from start date

    start date may can not be computer date, it may be a date before computer date but still has to start count from entered day. thanks for your help hope this is clear if not ask me next time you are on line.

  19. #19
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,759

    Re: condtional formatting

    so thats based on the start date entered in column D

    cell with date to test > EDATE(D5,11)

    so between 11 and 12 months in future
    AND(cell with date to test > EDATE(D5,11), cell with date to test < EDATE(D5,12))

    so if the startdate was
    1/1/13 UK Format in D5
    and you are testing the cell in E5
    then it would be red if the date is
    between 2/12/13 and 31/12/14

    see a simple sheet here
    change the dates in F5 and it will only be red if the date is between 2/12/13 and 31/12/13
    is that close to what you want for red - if not what needs to change

    if it is - we can then do yellow and green in a simple sheet and once that works
    apply to your sample sheet uploaded and make sure it works across that sheet
    Attached Files Attached Files

  20. #20
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: condtional formatting

    if the start date in d5 = 1/1/13 when that cell reaches 10 months later I would like that cell to change to yellow and then 11 months later cell d5 turn red.

    even if the date was any date eg 1/1/2014 green 1/10/2014/ yellow 1/11/2014 red

    insert any date in the cell and the count starts and changes colour in that cell in that cell. I am not sure weather we can do it in conditional formatting.

    All cells require this formula. again thank you for your help

  21. #21
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,620

    Re: condtional formatting

    Green: =now()-d5<303
    Yellow: =NOW()-D5>303
    Red: =NOW()-D5>333
    Attached Files Attached Files
    Ben Van Johnson

  22. #22
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: excel using conditional formatting

    Quote Originally Posted by etaf View Post
    use three conditions and make sure you order RED 1st ,then Yellow ,then green

    =cell with date < date(year(today()), month(today())-12, day(today()))
    - thats red

    =cell with date < date(year(today()), month(today())-11, day(today()))
    - thats yellow

    =cell with date <= today()
    - thats green

    for 2007 or 2010 excel version
    Conditional Formatting

    Highlight applicable range >>
    cell with the date in

    Home Tab >> Styles >> Conditional Formatting
    New Rule >> Use a formula to determine which cells to format
    Edit the Rule Description: Format values where this formula is true:

    one of the formulas from above

    Format… [Number, Font, Border, Fill]
    choose the format you would like to apply when the condition is true
    OK >> OK

    repeat for other formulas - order so its red,yellow,green and use stop if true

    the today() stops the formula from inputting any date and the start counting but I do not know what to use instead of the today argument

  23. #23
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: excel using conditional formatting

    the formula works from the date inputted to the cell as long as it is the date on the computer I want to input days before the computer date and the count starts from that date I think the today() argument stops this

  24. #24
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: excel using conditional formatting

    still having a problem if any one can help

    cell = date = green

    same cell = 10 months later = yellow

    same cell = 11 months later = red

    can not use today() value as the cell date maybe older than today()

  25. #25
    Registered User
    Join Date
    04-18-2014
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: excel using conditional formatting

    still having a problem if any one can help

    cell = date = green

    same cell = 10 months later = yellow

    same cell = 11 months later = red

    can not use today() value as the cell date maybe older than today()

  26. #26
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,759

    Re: excel using conditional formatting

    =cell with date < date(year(today()), month(today())-12, day(today()))

    so that is testing to see if the date that is in the cell is less than a year ago compared to the date today()

    so if the date is

    1/Jan/2013 - then that is over 12 months when compared to the date today

    =1/jan/2013 < date(year(today()), month(today())-12, day(today()))

    today() is 25/4/14

    and date(year(today()), month(today())-12, day(today()))
    takes 12 months away from today()

    so Today() - -12 months = 25/4/13

    =cell with date < date(year(today()), month(today())-12, day(today()))
    so
    = 1/jan/13 < 25/apr/13
    thats TRUE so = RED


    if you could explain what you need in the same extended way - and what cells you want to compare

    if you input a date into the system and want to start the count from that date - what do you mean - compare the input date with what other information

    input date
    1/jan/13

    so when we are at 1/jan/14 it is a year old
    but what are you using to test against , how will you know its the 1/jan/14 without using another cell or using the today() function to know the date when you open the spreadsheet ?

+ 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. 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
  2. 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
  3. Conditional Formatting Excel 07
    By vtek16 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-05-2007, 05:53 AM
  4. Conditional Formatting Excel 07
    By vtek16 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-04-2007, 05:47 PM
  5. conditional formatting in excel
    By Pritchett in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-27-2006, 06:40 AM

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