+ Reply to Thread
Results 1 to 3 of 3

[SOLVED] If, then with date

  1. #1
    Forum Contributor
    Join Date
    06-07-2013
    Location
    US
    MS-Off Ver
    Excel 365
    Posts
    485

    [SOLVED] If, then with date

    Hello,

    I enter a date in cell c7. I need a formula if the date begins with 12/31, doesn't matter what year it is, then on cell c9 will show a word "year", otherwise, it will shows a word "month". For example, the date is 12/31/2016. Since it begins from 12/31, then the word is year.

    I hope I explain well enough here.

    Thanks for the help.

    Jackson
    Last edited by jackson_hollon; 09-21-2016 at 02:37 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2006
    Location
    Melbourne, Australia
    MS-Off Ver
    Office 2016
    Posts
    1,075

    Re: If, then with date

    If cell C7 is formatted as a date, this IF statement should do what you are asking for: =IF(AND(MONTH(C7)=12,DAY(C7)=31),"year","month")

    Copy the formula and paste it into cell D7.
    Trish in Oz
    -------------
    A problem well defined is a puzzle half solved


    If you attach a sample of your workbook it will be easier to find a solution. Remember to remove/replace sensitive data before uploading the file. Look here if you need help with attachments:
    http://www.excelforum.com/faq.php?fa...b3_attachments

  3. #3
    Forum Contributor
    Join Date
    06-07-2013
    Location
    US
    MS-Off Ver
    Excel 365
    Posts
    485

    Re: If, then with date

    tuph

    It works. Thank you.

+ 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. Week to date, Month to date, Qtr to date and Year to date
    By Neilesh Kumar in forum Excel General
    Replies: 4
    Last Post: 06-10-2016, 08:53 AM
  2. [SOLVED] Formula to compare date (including month and year) from a listed date to today's date
    By mhewitson15 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-11-2014, 05:31 PM
  3. Counting if data falls on date between Start Date, End Date or Possible End Date
    By JessHasQuestions in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 07-26-2014, 08:01 AM
  4. Replies: 1
    Last Post: 05-26-2014, 03:46 AM
  5. Replies: 1
    Last Post: 10-02-2012, 02:42 PM
  6. Replies: 1
    Last Post: 09-28-2012, 08:52 AM
  7. Replies: 7
    Last Post: 11-16-2008, 05:48 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