

You might be interested in my TimeStamp(Target) function that uses an unthreaded Comment (a.k.a. If you just want the time, then change the innermost part of the macro to this: If nothing is already in that cell, then the current date and time is placed there. If so, then the tCell variable is set to the corresponding cell in column A. The macro checks to make sure that something is actually being entered into column B. (This places the macro in the ThisWorksheet module, which is required as it is an event handler that is executed whenever something in the worksheet changes.)
INSERT CURRENT DATE IN EXCEL WHEN A FIELD IS NOT EMPTY CODE
You can then place the macro into the code window that is displayed. To set up the macro, right-click on the worksheet tab and choose View Code. Set rInt = Intersect(Target, Range("B:B")) Private Sub Worksheet_Change(ByVal Target As Range) You can use the Worksheet_Change event to automatically enter a time into column A whenever something is entered into column B. If you don't want to allow circular references (by turning on iterative calculations), then the best approach is going to be through a macro. If it wasn't (meaning it already contained a time), then the current contents of cell A2 remain in place. However, the time is only put there if cell A2 was previously blank. Now, whenever you put something into cell B2, the time is entered automatically into cell A2. Make sure the Enable Iterative Calculation check box is selected.The Formulas area of the Excel Options dialog box. Click Formulas at the left side of the screen.In Excel 2010 or later versions display the File tab of the ribbon and then click Options.) (In Excel 2007 click the Office button and then click Excel Options. (In this case, the formula goes into cell A2 and also references cell A2.) To make this formula work properly, you need to follow these steps: In other words, the formula references the cell in which the formula is placed. The very first time you enter this, it is likely you'll get an error because the formula is circular. You could, however, make the formula in column A a bit more complex, in this manner: This means that the time shown in the column A cell containing this formula will always be changing it won't be a true time stamp. If there is something there, then the NOW function is called, returning the current time of the recalculation.

Thus, anytime the worksheet is recalculated, the contents of cell B2 are checked. Remember that the function always returns the current time.


While this will enter a time into column A if the corresponding cell in column B contains something, it won't give satisfactory results because of how the NOW function works. If you want a more automatic approach, you might think that you could use a simple formula in column A, such as this: Provided the cell is formatted to show times in 24-hour format, you'll see the current time as you want it. The simplest way to go about this is to use Excel's built-in shortcut for entering the current time: press Shift+Ctrl+ (that's a semicolon). In approaching this problem, let's assume that you want the time stamp to go into column A and you'll be entering your "who, what, why," and other info starting in column B. This way she can save time from checking the clock to write down the time. When the cell next to it is empty, she wants her time stamp cell to be blank. She would like to create a worksheet that she can type into and have the time stamp automatically populate as soon as she enters text into the cell next to it in that row. She also needs to document the time (in 24-hour format) that the call came in. When a call comes in over the radio, she needs to document who, what, why, etc. Donna needs to keep a log of activity that occurred throughout the day at her dispatch center.
