+ Reply to Thread
Results 1 to 5 of 5

IF Statment wont work due to =NOW() formula

  1. #1
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    IF Statment wont work due to =NOW() formula

    I am trying to do a simple IF statement to change the entry of a cell depending on when a "Date" in another cell reaches a certain date.

    e.g. first aid training expiry date = 4/7/2014

    I want the expiry cell to change when the Current date reaches that expiry date. to do this. I used =NOW() in a random cell to get the current date/time. but BECAUSE of that. the if statement wont work because this is formula im trying:

    a1 is the expiry date
    a2 is the =NOW() formula for current date

    =IF(a1=a2, "YES", "NO")

    but it doesn't recognise it because =NOW() formula?

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: IF Statment wont work due to =NOW() formula

    You can use Today() in A2 if you are interested in comparing dates only because Now() contains the time information along with the date.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  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 Statment wont work due to =NOW() formula

    Change =NOW() to =TODAY()


    TODAY = Date
    NOW = Date+Time

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: IF Statment wont work due to =NOW() formula

    Use Today() instead of Now() since now will get the date & time also.



    For exact Day match

    =IF(A1=TODAY(),"YES","NO")



    When the expiry date crossed the today's date

    =IF(A1<=TODAY(),"YES","NO")


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: IF Statment wont work due to =NOW() formula

    thank guys. appreciate it. stumbled across that little mistake myself in the last few minutes.

    cheers

+ 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. [SOLVED] Why formula wont work over multiple worksheets?
    By bjcowen9000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-13-2013, 06:51 PM
  2. Transpose wont work with Small(IF) formula
    By FrederikBjerre in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2012, 09:02 AM
  3. Excel formula wont work
    By thepitzaboy in forum Excel General
    Replies: 2
    Last Post: 07-08-2011, 02:31 AM
  4. Why wont max work on cells that have a formula
    By leedsexcel in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 11-23-2007, 02:31 PM
  5. Why wont this simple formula work
    By Bigredno8 in forum Excel General
    Replies: 3
    Last Post: 12-06-2005, 11:30 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