+ Reply to Thread
Results 1 to 8 of 8

IF statement with dates

  1. #1
    Registered User
    Join Date
    01-30-2012
    Location
    Shropshire
    MS-Off Ver
    Excel 2010
    Posts
    11

    IF statement with dates

    hi there,

    I am trying to get excel to minus 3 months from a date IF a condition is met. the formula is =IF(ISNUMBER(SEARCH("STD",G4)), DATE(DAY(J4),MONTH(J4)-3,YEAR(J4)), "No") where column J is set to a short date with day/month/year format. It comes back with #Value! anyone any ideas where I am going wrong ?

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: IF statement with dates

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I believe that you already checked that data in J4 is proper date.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: IF statement with dates

    Hi
    Try this

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Note:DATE(year, month, day)

  4. #4
    Registered User
    Join Date
    01-30-2012
    Location
    Shropshire
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: IF statement with dates

    yep J is set at date and has 28/2/2018 written in it

  5. #5
    Registered User
    Join Date
    01-30-2012
    Location
    Shropshire
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: IF statement with dates

    still get #value!

  6. #6
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: IF statement with dates

    Weird. Can you attached sample with your data, please?

  7. #7
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: IF statement with dates

    See the file
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-30-2012
    Location
    Shropshire
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: IF statement with dates

    Thank you Solved it.

+ 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. If statement with dates
    By itshere in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-09-2015, 11:33 AM
  2. IF Statement If Between these dates = this
    By Galbraith in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-30-2013, 01:31 PM
  3. IF STATEMENT and Dates
    By gballard in forum Excel General
    Replies: 6
    Last Post: 05-30-2012, 03:31 PM
  4. Help with if statement with dates
    By jmoore1197 in forum Excel General
    Replies: 4
    Last Post: 10-06-2009, 03:10 PM
  5. using dates in IF statement
    By bigchuda in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-28-2008, 02:55 PM
  6. Dates and if statement
    By FSCGunslinger in forum Excel General
    Replies: 7
    Last Post: 02-12-2008, 08:39 AM
  7. If Statement and Dates
    By Toys in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-21-2005, 08:35 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