Forum Discussion

Jennifer Clark's avatar
Jennifer Clark
Copper Contributor
Apr 23, 2018
Solved

If Statement returns NOW() Function

I need the formula that will allow me to say If Cell X isnot blank then return now() for true or "Not Checked out" for false. 

 

=IF(B2 <> "","Date","Not Checked Out")

 

I can't figure out how to get the "True" to return Now() or Date()

  • Hi Jennifer,

     

    Simply, replace this:

    =IF(B2 <> "","Date","Not Checked Out")

    With this:

    =IF(B2 <> "",NOW(),"Not Checked Out")

    Or this:

    =IF(B2 <> "",TODAY(),"Not Checked Out")

     

  • Jennifer Clark's avatar
    Jennifer Clark
    Copper Contributor
    Haytham Amairah Question - HOw do I get the NOW() function to stay static and not auto-update? I want it to return the date/time of when we check something in but it keeps updating to the current NOW() ??
    • Haytham Amairah's avatar
      Haytham Amairah
      Silver Contributor

      Hi Jennifer,

       

      This is because that the NOW function is volatile!

      It depends on the current time and date in operating system time.


      If you asking about the date/time stamp solution, unfortunately, this is can only be done by using macros or some third-party add-ins.

      Please check this link to see that.

      Good luck

  • Haytham Amairah's avatar
    Haytham Amairah
    Silver Contributor

    Hi Jennifer,

     

    Simply, replace this:

    =IF(B2 <> "","Date","Not Checked Out")

    With this:

    =IF(B2 <> "",NOW(),"Not Checked Out")

    Or this:

    =IF(B2 <> "",TODAY(),"Not Checked Out")

     

Resources