Closed Thread
Results 1 to 6 of 6

Using Today() and making it Static based on a particular condition.

  1. #1
    all4excel
    Guest

    Using Today() and making it Static based on a particular condition.

    Using Today() and making it Static based on a particular condition.

    I have a Sheet in which I keep a record of all the Task Assigned to my Team Mates.I dont write the date in this Sheet I get it by the virtue of TODAY(), however today is a Dynamic function so it keeps on updating everyday..

    I would make it blank by "" when there are no Tasks mentioned in the Column D, however if there's something mentioned in the Column D then the Current date should become static as I would need to keep a track as when this Task was Assigned to a team mate..

    One more thing is to avoid getting weekends like Saturday/Sundays
    or any Public Holidays. Is that possible?

    Like for instance the Function Today() would be used to get the dates excluding any Weekends or Holidays and it should become static when Any Data is entered in Column D. So, if there's no data in column D, then it should remain dynamic displaying the current date.

    I want to use the same logic to track the Time for each Completed task shown in the Tab Sarah.

    I would appreciate if I could get help in Excel preferably though if its not possible then VBA would also do...

    Please find the attachment.

    Attached Files Attached Files

  2. #2
    all4excel
    Guest

    Bump...

    Please anyone
    This can help me robust Tracking systems...

  3. #3
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264
    Suggest you search the the forums for date/time stamping.

    Lots of previous posts on the subject, solutions use VBA
    Ed
    _____________________________
    Always learning, but never enough!
    _____________________________

  4. #4
    all4excel
    Guest

    Dear Ed..

    Quote Originally Posted by EdMac
    Suggest you search the the forums for date/time stamping.

    Lots of previous posts on the subject, solutions use VBA
    Dear Ed,

    I had already tried that earlier as well, however with different "keywords" ofcourse..

    However, when u mentioned that I came up with the following Links..

    http://www.excelforum.com/showthread...=time+stamping

    -----------------------------------------------------------------

    http://www.excelforum.com/showthread...=time+stamping

    -----------------------------------------------------------------

    -----------------------------------------------------------------

    I would appreciate if anyone could help me with a User Defined Function as I am not familiar with VBA at all.

  5. #5
    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
    all4excel

    Code deleted as not wrapped as per forum rules below

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  6. #6
    Forum Contributor EdMac's Avatar
    Join Date
    01-23-2006
    Location
    Exeter, UK
    MS-Off Ver
    2003
    Posts
    1,264

    Be brave!

    UDFs use VBA so no difference.....

    Suggest you try out one of the solutions you have found in a copy of your sheet, altering the values to suit, and see how you get on. VBA is the only way to achieve the solution you require, so pluck up your courage and give it a whirl!

  7. #7
    all4excel
    Guest

    Smile EdMac- Your words are really encouraging- Buck Up types..

    Quote Originally Posted by EdMac
    UDFs use VBA so no difference.....

    Suggest you try out one of the solutions you have found in a copy of your sheet, altering the values to suit, and see how you get on. VBA is the only way to achieve the solution you require, so pluck up your courage and give it a whirl!

    I will definitely give it a try..
    However, before I could try, just wanted to know whether I can get User Defined Function in this manner where I can pass arguments where the Date should remain Static or Updating as it does for the TODAY().

    I will give an Analogy

    The Function [ =cell("filename") ] gives you the complete path of the Sheet, however it changes if you open any other file.

    In order to avoid this to happen you put a cell address next to the filename.
    [ =cell("filename",A1) ] and the path reamins unchanged even while swapping between different sheets.

    Like a Modified [ = Today() ] where I pass the values 0 for the regular updation and 1 for making it Static wherever neccessary..

    [ = Today(0 or 1) ] and this 0 or 1 can be derived by the simple usage of IF condition...

    In my case, if this were possible [ = Today(if(not(isblank(A2)),1,0) ]

  8. #8
    all4excel
    Guest

    Putting the code and Wrapping it too..!

    NOOB,

    I am putting the code and wrapping it this time so kindly do not delete this threads..

    http://www.excelforum.com/showthread...=time+stamping

    Code-
    -------------------------------------------------------------
    HTML Code: 
    -------------------------------------------------------------

    http://www.excelforum.com/showthread...=time+stamping
    -----------------------------------------------------------------
    Simon Lyod's Code

    HTML Code: 
    -----------------------------------------------------------------

    http://www.excelforum.com/showthread...=time+stamping

    -----------------------------------------------------------------
    HTML Code: 
    -----------------------------------------------------------------

  9. #9
    all4excel
    Guest

    Smile Thanks Noob - I used your solution..

    I used this code from VBA Noobs solution in the following thread.

    http://www.excelforum.com/showthread...=time+stamping


    HTML Code: 

  10. #10
    all4excel
    Guest

    VBA Need some help..

    Quote Originally Posted by all4excel
    I used this code from VBA Noobs solution in the following thread.

    http://www.excelforum.com/showthread...=time+stamping


    HTML Code: 
    This worked fantastically for one thing where I needed DATE and Time , but I also need to have the DATE and Time when the Status in the Column F is Changed to Closed, so how do I modify this code as it works for Blank and Non-blank values..

    The information is as mentioned
    Status Completed on Actual Time
    In Progress 28-May-08 01:59


    The Status is in Column F and the Date and the Time in Columns G and H respectively.
    The Column F has a Drop-down with three options
    1. Default Blank Option
    2. In Progress
    3. CLosed

    So can u kindly modify your code with explanation if possible..!
    Last edited by all4excel; 05-27-2008 at 04:39 PM.

  11. #11
    all4excel
    Guest

    Question Anyone please help me!

    Anyone please help me!
    HTML Code: 
    I want this to work based on the values in the Colmn F-Dropdown containing three values
    1. Default Blank Option - Nothing should happen
    2. In Progress - Current date and No time
    3. CLosed - Current date + Time



    I tried this but it doesnt work..and I dont know VB
    Last edited by all4excel; 05-28-2008 at 01:39 AM.

  12. #12
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I have added a couple of User Defined Functions & amended the existing formulas to use these.
    Attached Files Attached Files
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  13. #13
    all4excel
    Guest

    Smile Dear Roy..

    Quote Originally Posted by royUK
    I have added a couple of User Defined Functions & amended the existing formulas to use these.
    Can u please elaborate on How I use these functions as I do not know to use VB..

    Thanks kindly explain if possible.

  14. #14
    all4excel
    Guest

    Roy

    I am not able to use the functions so kindly provide the explanation as its not working maybe I dont know how to make it work...

    I dont know what USER defined function u mentioned in the thread..

  15. #15
    all4excel
    Guest

    Bump.........

    Bump.........

  16. #16
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    The code is in the workbook, open the VB Editor to see, & the formulas are in the sheet. See the formula in C2- =IF(ISBLANK($E2),"",statictime()). The time entered by the formula will not change.
    Last edited by royUK; 05-29-2008 at 10:13 AM.

  17. #17
    all4excel
    Guest

    Question How to use it in other workbooks?

    Quote Originally Posted by royUK
    The code is in the workbook, open the VB Editor to see, & the formulas are in the sheet. See the formula in C2- =IF(ISBLANK($E2),"",statictime()). The time entered by the formula will not change.
    Thanks a million...
    U gave me exactly what I was looking for a Function In Excel..

    However, how do I make use of this function in other Workbooks..?

  18. #18
    all4excel
    Guest

    Question

    Roy,

    Its not working in the cell G2 and H2

    [ =IF(ISBLANK($F2),"",IF($F2="Closed",staticdate(),TODAY())) ]

    [ =IF(ISBLANK($F2),"",IF($F2="Closed",statictime(),NOW())) ]

    As explained earlier there are three things in the dropdown in Column F in the Sheet "Sarah".

    The Column F has a Drop-down with three options
    1. Default Blank Option
    2. In Progress ---It will lead to ToDAy() in Column G and Now() in Column H
    3. CLosed

    More importantly how do i make use of this wonderful User Defined Functio in other worksheets?

    Please reply so that this thread can be closed...!

  19. #19
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161
    All4excel, you have changed your original request through this thread, you say you don't know how to us "vb" but have 426 posts?

    I am closing this thread now, if you need to continue with this line of questioning please do so in a new thread however please be very clear and concise.
    Not all forums are the same - seek and you shall find

Closed 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