1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Excel auto date.

Discussion in 'Business Applications' started by danshone, Sep 29, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. danshone

    danshone Thread Starter

    Joined:
    Sep 29, 2008
    Messages:
    6
    Hi!

    Is there any way to get Excel, to automatically insert the date into the first cell in column A everytime a new row is inserted?
     
  2. computerman29642

    computerman29642

    Joined:
    Dec 4, 2007
    Messages:
    2,895
    Dan, welcome to the forum. :)

    Could you explain a little more as to what you are trying to accomplish? Also, could you attach a sample file?
     
  3. danshone

    danshone Thread Starter

    Joined:
    Sep 29, 2008
    Messages:
    6
    thanks for the welcome!

    Where i work, we use an excel work sheet to log daily phone calls.

    What happens is, everytime someone take a new call, they insert a line into the spreadsheet and add the date.

    Problems have occured with people entering the wrong date or more importantly they use =today() and the date changes when the spreadsheet is reopened.

    see attached if it makes more sense!

    if it helps, we're using excel 2007
     

    Attached Files:

  4. danshone

    danshone Thread Starter

    Joined:
    Sep 29, 2008
    Messages:
    6
    bump!
     
  5. bomb #21

    bomb #21

    Joined:
    Jul 1, 2005
    Messages:
    8,546
    Yes, there's a way; VBA. Depends whether you want to get into that or not.

    Open the attached. Make an entry in B4. Current date (according to your PC setting) appears in A4.

    Right-click the sheet tab, then select "View Code" from the pop-up menu to view the code. The line Cells(Target.Row, 1) = Date does the "dating". (Press ALT+Q to return to Excel)

    But then other questions arise. Will users need to make changes to column B (since that's the one we're using as the trigger) at some later date? Because that would cause column A to update, so you'd have to adapt the code to avoid that if not required. And ... if not column B, then which column should be the trigger? It would have to be one that would definitely have some value at the initial stage.

    So ... it can be done, but it might be easier if you just tell users to use the "enter current date" shortcut -- CTRL+; -- to fill out column A.

    HTH
     

    Attached Files:

  6. danshone

    danshone Thread Starter

    Joined:
    Sep 29, 2008
    Messages:
    6
    thanks for that, it's what i was looking for. just as long as the date in column A doesn't update to tomorrows date when it is reopened.
     
  7. Zack Barresse

    Zack Barresse

    Joined:
    Jul 25, 2004
    Messages:
    5,452
    Can you clarify this? Are they actually using the Insert functionality? I would hope not. Inserting is not a good thing to do. Arguably it's the next worst thing behind merging cells ever to be put into Excel. And deleting cells, muy malo. (n)

    If you're saying that when they start typing on a new row (and as bomb's code works) and enter data in column B (as long as it's not on the first row of headers) the current date is entered into that row of column A (not as a formula), then bomb's solution is perfect for you.

    However, be aware, there is not VBA event for the inserting or deleting of rows, and you cannot programmatically sense when this happens. Not to mention if you have formulas it destroys the dependencies created, hence formula hell.
     
  8. Keebellah

    Keebellah Trusted Advisor

    Joined:
    Mar 27, 2008
    Messages:
    6,591
    First Name:
    Hans
    Hi, I don't know how much you want to enter, but there a nice logging tool built into Notepad.

    Create a blank txt file , name ik Telephonelog.txt
    enter .LOG (it's case sensitive) as the first line and save it, PS dont forget the dot in front of the LOG.

    Now everytime you open this file a timestamp is added and you can enter your text under it, save it and so on.

    .LOG

    23:14 06/10/2008

    This would be a result if I did it now, remember by date and time settings are different than yours but you get the idea?

    Try it. it's a quick and fast way, you can always use this file as input for more sophisticated reporting.
    Cheers.
     
  9. Zack Barresse

    Zack Barresse

    Joined:
    Jul 25, 2004
    Messages:
    5,452
    Keebellah, that is one of the neatest tricks I've ever seen!! Thank you very much for sharing!! Wow, awesome. :D
     
  10. Rollin_Again

    Rollin_Again

    Joined:
    Sep 4, 2003
    Messages:
    4,912
    Instead of entering the data directly into the workbook why don't you use an input form that will transfer the data into the workbook with the correct date?

    Regards,
    Rollin
     
  11. slurpee55

    slurpee55

    Joined:
    Oct 20, 2004
    Messages:
    7,837
    Uh, holy cow!!! Really neat, Keebellah!!!
     
  12. danshone

    danshone Thread Starter

    Joined:
    Sep 29, 2008
    Messages:
    6
    Thanks for all the replys.

    Bomb's solution has worked just great.

    Zack, i understand what your saying about insertng lines, unfortunately, some people don't grasp that concept it it make for "interesting" call logging.

    The final route forward for us will be to purchase contact management software, so this fix wont have to last long!
     
  13. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/754413

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice