Closed Thread
Results 1 to 4 of 4

auto fill-in current date/time and duration

  1. #1
    Registered User
    Join Date
    11-08-2013
    Location
    Chicago, US
    MS-Off Ver
    Excel 2007
    Posts
    7

    auto fill-in current date/time and duration

    This is my first post on this forum. I used to be an avid user of experts-exchange, but lately all my questions have been excel-related. So since this forum is dedicated to excel - sounds like this is the place to be.

    In the following home made time log of activity https://www.dropbox.com/s/0heou3740rpc9os/Tasks.xlsx, I would like the following to happen.
    When I enter the current task into A3, I want C2 (i.e. end time of previous task) and B3 (begin time of current task) to become auto-populated with current date/time and I want D2 to become populated with duration (of that previous task, of course).

    How would I do that?

    Thanks so much!
    Alex

  2. #2
    Forum Contributor
    Join Date
    06-24-2013
    Location
    philippines
    MS-Off Ver
    Excel 2007
    Posts
    199

    Re: auto fill-in current date/time and duration

    i'll try to answer... im just a newbie myself but i hope i can help to get you started..

    in B3, write this =IF(A3<>"",C2," ") (this will copy whatever is the end time of previous task as soon as a task name is written in column A)
    in C3, write =NOW() then just copy paste special the values
    in D3, write C3-B3 (make sure that column D is formatted as hh:mm:ss)

    just drag down the formula to the last row you need

    hope this helps somehow.... otherwise let's wait for the experts.

  3. #3
    Registered User
    Join Date
    11-08-2013
    Location
    Chicago, US
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: auto fill-in current date/time and duration

    Thanks for such prompt response, but I want this to happen automatically without having to fill anything in each time. All I want to do is enter the text into the task field and hit enter.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: auto fill-in current date/time and duration

    Thread posted in CS subforum hence closed.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Auto Run Macro to fill and lock the date & Time
    By shaikh.2211 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-15-2012, 02:49 AM
  2. [SOLVED] Auto-fill the current date if the previous row was empty
    By lesoies in forum Excel General
    Replies: 5
    Last Post: 09-22-2012, 11:44 AM
  3. Auto fill Date + Double click (time stamp)
    By SVTF in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-05-2012, 03:29 PM
  4. Auto fill date/time
    By albert28 in forum Excel General
    Replies: 11
    Last Post: 07-27-2010, 08:31 AM
  5. [SOLVED] Date/time Duration
    By zjay in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-24-2005, 06:06 AM

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