+ Reply to Thread
Results 1 to 5 of 5

Determine if the year in two dates are the same.

  1. #1
    Registered User
    Join Date
    06-20-2011
    Location
    Reston, VA
    MS-Off Ver
    Excel 2007
    Posts
    19

    Determine if the year in two dates are the same.

    I need the if statement that will determine if the year in two dates in different columns are in the same. The years are formatted mm/dd/yyyy. If true then I need to insert the YEARFRAC formula.

    Any help is greatly appreciated

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Determine if the year in two dates are the same.

    =if(year(a1)=year(b1),if true,if false)
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Registered User
    Join Date
    06-20-2011
    Location
    Reston, VA
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Determine if the year in two dates are the same.

    Thank you for your quick response. I'll give it a try.

  4. #4
    Registered User
    Join Date
    06-20-2011
    Location
    Reston, VA
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Determine if the year in two dates are the same.

    I finally got around to the worksheet again and used your formula. It worked wonderfully. Thanks again.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Determine if the year in two dates are the same.

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. Input a year to determine the start date for 4-4-5 Calendar Year.
    By mak1176 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-25-2013, 10:34 AM
  2. Replies: 7
    Last Post: 07-01-2012, 05:43 PM
  3. Replies: 5
    Last Post: 02-09-2011, 06:29 AM
  4. Determine if date is before end of fiscal year of previous year
    By ccarver in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-13-2010, 11:53 AM
  5. Determine Quarter & Year
    By Kolacube in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-25-2008, 07:02 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