Current date and Time

December 6, 2010 at 21:37:48
Specs: Windows XP
How i can set a formula that if i enter some digits in a cell of MS Excel then in other cell show me that date and time when i enter that digits, and this date and time don't update. I know this formula =IF(A1="","",Now())
But with this formula date and time regularly update.
I also know the shortcut key Ctrl + ;
But this shorcut is difficult to use me. Actually i am forex trader and in a day hundreds times i buy and sell so for each trade i have to use shortcut key (Ctrl + ;) four times (one for buying time of my country and one for selling time of my country and same for EST time so total is four times)
plz help me

See More: Current date and Time

Report •

December 7, 2010 at 02:06:15
Right click the worksheet tab for the sheet you want this to happen in.

Paste the following code into the pane that opens.

Whenever you change a cell in Column 1 (A), the current time and date will be placed in Column B. Format the cells as as desired.

It should be obvious what changes to make if Columns A & B are not the columns you are working with.

Private Sub Worksheet_Change(ByVal Target As Range)
 If Target.Column = 1 Then _
  Range("B" & Target.Row) = Now
End Sub

Posting Tip: Before posting Data or VBA Code, read this How-To.

Report •
Related Solutions

Ask Question