+ Reply to Thread
Results 1 to 7 of 7

Conditional format for year

  1. #1
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    2021
    Posts
    154

    Conditional format for year

    Good Morning Everyone,

    Using Excel XP

    In column A I have a list of different dates in this format: m/d/yyyy
    eg (11/3/2006).

    I want to apply a conditonal format to find any date only in 2006 but can't get it to work.

    I know the formula to find today is =today() but I'm stuck on how to find the year.

    Hope someone could help me out on this, thanx.

    Mike

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    =Year(today())

    HTH
    Carim

  3. #3
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    2021
    Posts
    154

    Problem

    Hi Carin,
    For some reason when I use the formula in conditional formatting

    Cell Value Is: equal to: =year(today()) it doesn't format the dates for 2006.

    When I use Formula Is: =year(today()) it formats ALL the dates no matter what year it is.

    Am I doing something wrong?

    Thanks Mike

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Sorry for misleading you ...

    Use Formula Is
    =YEAR(A1)=2006

    or better
    =YEAR(A1)=Year(today())

    HTH
    Carim
    Last edited by Carim; 11-03-2006 at 09:43 AM.

  5. #5
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by windme
    Hi Carin,
    For some reason when I use the formula in conditional formatting

    Cell Value Is: equal to: =year(today()) it doesn't format the dates for 2006.

    When I use Formula Is: =year(today()) it formats ALL the dates no matter what year it is.

    Am I doing something wrong?

    Thanks Mike
    I suppose your data is in the range of A1:A100
    select this range
    go to Format > Conditional Formatting

    put in Formula is =YEAR(A1)=2006
    and click on Formate tab and select any colour from Patterns tab

    Regards.

  6. #6
    Forum Contributor
    Join Date
    11-22-2003
    Location
    Newport, Rhode Island
    MS-Off Ver
    2021
    Posts
    154
    Thanx Carim......got it working.

    Appreciate your help,

    Mike

  7. #7
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by Carim
    Sorry for misleading you ...

    Use Formula Is
    =YEAR(A1)=2006

    or better
    =YEAR(A1)=Year(today())

    HTH
    Carim
    Hi Carim

    I think better is =YEAR(A1)=2006

    because 2nd formula will change the result in 2007.

+ 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