+ Reply to Thread
Results 1 to 9 of 9

Question about time...

  1. #1
    Registered User
    Join Date
    09-15-2006
    Posts
    5

    Question about time...

    Hi,

    I have tried and tried so many times but I just can't figure it out. I wanted to know how to trigger a response when a set time has finished. It's like a deadline indicator. When NOW() time is later than a stated time by 30 days, I want something to happen. Is it possible to integrate IF() with this?

    Thanks.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    You could try this

    =IF(A1-TODAY()+1>30,"Your Formula","")

    Change "Your Formula" to what you need to happen

    VBA Noob

  3. #3
    Registered User
    Join Date
    09-15-2006
    Posts
    5
    And what's A1?

    I assumed it was the reference date I was talking about. Apparently it doesn't work. Typing it out gives a value of zero when the reference date was in february. When I use the guided approach, it says that the logical statement is "volatile". The reference that I was talking about is only formed of dates and no time, like 1/2/2006.

    Thanks for the reply.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Can you post an exaple of data and expected result

    VBA Noob

  5. #5
    Registered User
    Join Date
    09-15-2006
    Posts
    5
    Look at the picture. What I expect it to do is calculate the number of days between today's date and that date on A1, and output the number. But instead of making it output the number, insert it into a logical statement so that something would appear in A2 if it is more than 30 days, and nothing would appear if it is less than 30 days.
    Attached Images Attached Images

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    It's a negative date. You must enter the formula as

    =TODAY()-A1+1

    VBA Noob

  7. #7
    Registered User
    Join Date
    09-15-2006
    Posts
    5
    Ok, I have reversed the TODAY() and A1 positions. Without the +1 behind, it would display a date. However, excel is assuming (mind me for I use dd/mm/yyyy format) 17/9/2006 minus 1/2/2006 to give me something funny like 15/7/1900. Perhaps I have to convert the dates to days on a year first before arithmetically deducting them?

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    How format the cell as General

    VBA Noob

  9. #9
    Registered User
    Join Date
    09-15-2006
    Posts
    5
    Oh so it was just a matter of cell formatting...

    Ok, now I got it. Thanks a ton!

+ 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