+ Reply to Thread
Results 1 to 4 of 4

IF statement and date formatting

  1. #1
    Forum Contributor
    Join Date
    01-27-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    120

    IF statement and date formatting

    Hi,

    I am trying to use an 'IF' statement to look up a date and return a Yes/No if the date exists.

    The 'IF' statement is looking at a cell whose data is being found by a 'VLookUp'
    See attached file.

    The problem I am having is the 'IF' statement is not picking up the month even though it exists in the cell. The date is formatted - mmm.

    I think it may be a formatting issue but not sure how to resolve.

    Terry
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: IF statement and date formatting

    Change the formula to this...
    =IF(TEXT(A2,"mmm")="Dec","Yes","No")

    Although A2 looks like it contains Dec, it actually contains 38715 (CLICK f2, THEN f9)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    01-27-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    120

    Re: IF statement and date formatting

    Thanks, works great.
    Terry

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: IF statement and date formatting

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below my 1st post to 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. Replies: 1
    Last Post: 11-21-2013, 01:16 PM
  2. [SOLVED] If Statement with today's date minus due date for a delay calculation
    By RDFUC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2013, 02:58 PM
  3. [SOLVED] If statement to check if date falls between date range
    By mcranda in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-21-2013, 07:31 PM
  4. IF statement using formatting criteria (NOT conditional formatting)
    By chelseasikoebs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2009, 01:57 AM
  5. Replies: 8
    Last Post: 12-21-2007, 12:21 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