+ Reply to Thread
Results 1 to 12 of 12

If function regarding date and time

  1. #1
    Registered User
    Join Date
    09-16-2008
    Location
    Canada
    MS-Off Ver
    Excel 2003 (silly work wont upgrade)
    Posts
    74

    If function regarding date and time

    Hey Gang,

    Just a question regarding the if function.

    I need to set up a tracking sheet that when you insert the date/time on cell B4 it will post "Please Review" if it has been more then 48hrs from the original date and time. I did it before but a loonnnnnngg time ago and am having a brain fart because i know you have to edit the cell to recognize the time in hh:mm... am i right on that??

    Thanks all for your help.

    cheers
    Mike
    Last edited by mikeydaman; 06-17-2009 at 11:08 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: If function regarding date and time

    You mean perhaps something along the lines of:

    C4: =REPT("Please Review",(B4>0)*((NOW()-B4)>2))

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If function regarding date and time

    tRY:

    =IF(B4<=NOW()-2,"PLEASE REVIEW","")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: If function regarding date and time

    =if(a1+2>today(),","loads of time"please review") for days with a1 in format dd/mm/yyy
    or for +48 hours
    =IF(A1+2>NOW(),"loads of time","please review") a1 in format dd/mm/yy hh:mm
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    09-16-2008
    Location
    Canada
    MS-Off Ver
    Excel 2003 (silly work wont upgrade)
    Posts
    74

    Re: If function regarding date and time

    Hey Don,

    Thanks for the quick reply. I need to format the date/time cell to be in reference with the formula as it gives me a Value error.

    Thanks for the help, its much appreciate.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: If function regarding date and time

    Can you post a sample ?

    Are you saying B4 is not a true datetime value ? Confused...

  7. #7
    Registered User
    Join Date
    09-16-2008
    Location
    Canada
    MS-Off Ver
    Excel 2003 (silly work wont upgrade)
    Posts
    74

    Re: If function regarding date and time

    Thanks guys for all your help NBVC.. what a **** i am huh!!! i was looking to hard into it and didn't event realize to use the NOW hahahah thought i was going to have to format the cell and all.

    Thanks guys again!
    Last edited by NBVC; 06-17-2009 at 10:02 AM. Reason: corrected my name spelling

  8. #8
    Registered User
    Join Date
    09-16-2008
    Location
    Canada
    MS-Off Ver
    Excel 2003 (silly work wont upgrade)
    Posts
    74

    Re: If function regarding date and time

    Sorry NBVC about the name

    One last thing before we can close this thread. Is there a way to have the cell not have "Please Review" up all the time if their is no date in it? This is going to be saved as a template and people will just open it and use it when needed so everything will be blank.

    Thanks

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: If function regarding date and time

    What does mine do... so confused...

    =REPT("Please Review",(B4>0)*((NOW()-B4)>2))

    should only display Please Review if B4 is > 0 and B4 is more than two days prior to current datetime

    That said I think Martin's approach was simplest of all...

    =REPT("Please Review",(B4+2)<NOW())
    Last edited by DonkeyOte; 06-17-2009 at 10:11 AM.

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If function regarding date and time

    Or simply...

    =IF(OR(B4>NOW()-2,B4=""),"","PLEASE REVIEW")

  11. #11
    Registered User
    Join Date
    09-16-2008
    Location
    Canada
    MS-Off Ver
    Excel 2003 (silly work wont upgrade)
    Posts
    74

    Re: If function regarding date and time

    You guys are awsome thanks again.
    NBVC your original was giving me a VALUE error for some reason. I though i might have had to format the date/time cell. But all in all you guys got it working for me.

    Thanks again for everyones help
    Last edited by mikeydaman; 06-17-2009 at 11:10 AM.

  12. #12
    Registered User
    Join Date
    09-16-2008
    Location
    Canada
    MS-Off Ver
    Excel 2003 (silly work wont upgrade)
    Posts
    74

    Re: If function regarding date and time

    Quote Originally Posted by NBVC View Post
    Or simply...

    =IF(OR(B4>NOW()-2,B4=""),"","PLEASE REVIEW")
    I ended up going with this one as it worked for me

    Thanks NBVC

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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