+ Reply to Thread
Results 1 to 9 of 9

Conditional formatting a cell(s) with a date formula within cell; multiple IF statements

  1. #1
    Registered User
    Join Date
    11-06-2012
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    7

    Conditional formatting a cell(s) with a date formula within cell; multiple IF statements

    Attached is the spreadsheet working on and am stuck in two areas.
    1) The cell range of D3:I42 - I tried creating a conditional format so if the value is equal to the current year, it should stand out (red color for example). There is a conditional format in there but it fails to do what I thought it would.
    2) Column J - I put the formula in J3 and J4 but this does not work. What it should do is if any of the cells have the value of the current year, then a comment should be placed in there. (See farther down Column J for sample comments I just wrote in there). I would like each service year (7,10,15, etc.) to have its own color so it would be easier to note which employees are up for which award.

    Am somewhat a novice but it seems Excel does not recognize the value of the cell as '2012' (the current year) otherwise whatever is set up to happen, should trigger. Help please.

    TheMick
    Annual Service Awards-2.xls

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Conditional formatting a cell(s) with a date formula within cell; multiple IF statemen

    Hi themick

    Try: YEAR(D3)=YEAR(TODAY())

  3. #3
    Registered User
    Join Date
    11-06-2012
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Conditional formatting a cell(s) with a date formula within cell; multiple IF statemen

    If I place this as the formula for the conditional rule, it doesn't change anything for the range. Is this where you meant I should put that?

  4. #4
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Conditional formatting a cell(s) with a date formula within cell; multiple IF statemen

    Hi themick

    See the attached!

  5. #5
    Registered User
    Join Date
    11-06-2012
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Conditional formatting a cell(s) with a date formula within cell; multiple IF statemen

    Thank you so much, I had " " around the formula and that was keeping it from working properly (am guessing a copy/paste issue).
    One more question if you would be so kind - Column J4 has this formula in it:

    =IF(D4=YEAR(TODAY()),"7 YEARS",IF(E4=YEAR(TODAY()),"10 YEARS",IF(F4=YEAR(TODAY()),"15 YEARS",IF(G4=YEAR(TODAY()),"20 YEARS",IF(H4=YEAR(TODAY()),"25 YEARS",IF(I4=YEAR(TODAY()),"30 YEARS",""))))))

    It should trigger because F4 is 2012 - where am i missing on this formula?

  6. #6
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Conditional formatting a cell(s) with a date formula within cell; multiple IF statemen

    Hi themick

    I have replaced that formula with another one, check your workbook I uploaded in post #4.

  7. #7
    Registered User
    Join Date
    11-06-2012
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Conditional formatting a cell(s) with a date formula within cell; multiple IF statemen

    Wow-I would not have come up with that on my own. I greatly appreciate your assistance helping me get this created. Happy Thanksgiving

    Mike

  8. #8
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Conditional formatting a cell(s) with a date formula within cell; multiple IF statemen

    Hi themick

    Thanks for the feed back. i forgot to add that cells D2:I2, I deleted the text in each cell so they are now numbers, then formatted the cells: 0" YRS"
    The same cell formatting applies in J3:J42 0" YEARS"

    Kevin
    Last edited by Kevin UK; 11-21-2012 at 02:25 PM. Reason: Spelling error

  9. #9
    Registered User
    Join Date
    11-06-2012
    Location
    california
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Conditional formatting a cell(s) with a date formula within cell; multiple IF statemen

    Thank you again for your input, that does clarify for me.

+ 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