+ Reply to Thread
Results 1 to 3 of 3

If Formula Help Date Range

  1. #1
    Registered User
    Join Date
    07-08-2017
    Location
    Minnesota
    MS-Off Ver
    Microsoft Office 2016
    Posts
    74

    If Formula Help Date Range

    Hello,

    In the attached workbook, I am trying to make an IF formula so if the date in A1 and down is less than 01/01/2017, it returns a 1 in cell B1. I am not sure if I have to format the formula differently for it to know I am typing a date in the IF formula. Can someone please help?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,207

    Re: If Formula Help Date Range

    In B1

    =IF(A1 < DATEVALUE("1/1/2017"),1,0)

    copy down

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: If Formula Help Date Range

    With your formula like this

    =+IF(A1 < 1/1/2017,1,0)

    Excel is reading that like this
    If A1 is Less Than 1 divided by 1 divided by 2017 Then 1, else 0

    To make that be treated as a date, try
    =+IF(A1 < "1/1/2017"+0,1,0)
    or
    =+IF(A1 < DATE(2017,1,1),1,0)

+ 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: 7
    Last Post: 07-14-2017, 12:04 PM
  2. Replies: 1
    Last Post: 11-24-2015, 03:00 AM
  3. [SOLVED] how to match one date range with another date range -formula
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-05-2014, 06:18 PM
  4. [SOLVED] Apply formula to one date range, another to another date range
    By Caulerpa in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-10-2014, 11:04 AM
  5. Replies: 15
    Last Post: 04-08-2013, 12:40 PM
  6. Formula for determining if two date columns fall within specific date range
    By Igottabeme in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-20-2006, 09:55 PM
  7. Replies: 1
    Last Post: 04-20-2006, 05:10 PM

Tags for this Thread

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