Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i want to do that as i enter any name in a cell and press enter its automaticly collect the date and time from system to next cell how can i do this plz help me !! thankx
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If a value is entered in column "a" then column "b" will have the date &
time inserted. Paste this code in the worksheet module. Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("A:A")) Is Nothing And Target.Count = 1 Then Target.Offset(0, 1) = Format(Date, "m/d/yy h:mm;@") End If End Sub -- Regards, Rocky McKinley "auto pick date & time as i enter name" wrote in message ... i want to do that as i enter any name in a cell and press enter its automaticly collect the date and time from system to next cell how can i do this plz help me !! thankx |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assuming your Name is entered into Column B (in this example), add this code
to your worksheet Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 2 Then Target.Offset(0, 1).Value = Now() End Sub Rob "auto pick date & time as i enter name" wrote in message ... i want to do that as i enter any name in a cell and press enter its automaticly collect the date and time from system to next cell how can i do this plz help me !! thankx |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
right click the sheet tab, select View Code and add the
following code by the "next cell" one assume the cell to the right of the one that had the entry. The code uses the CHANGE event that fires every time an entry is made. The boolean is set to stop the code when the date is entered. Option Explicit Private bStop As Boolean Private Sub Worksheet_Change(ByVal Target As Range) If bStop Then bStop = False Else bStop = True Target.Offset(0, 1).Value = _ Format(Now(), "dd-mmm-yy hh:mm") End If End Sub Patrick Molloy Microsoft Excel MVP -----Original Message----- i want to do that as i enter any name in a cell and press enter its automaticly collect the date and time from system to next cell how can i do this plz help me !! thankx . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Duplicate posting.
My reply in another section checks which column the data is entered. think this is better because the example above will run wheneve anything is entered in the sheet -- Message posted from http://www.ExcelForum.com |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
******** MULTIPLE POSTING
This is not necessary as most of us read all the Excel sections. This could stop us answering *any* of your queries from the assumptio that you have posted elsewhere -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto enter date when data in enter in another cell | Excel Worksheet Functions | |||
Auto enter date | Excel Discussion (Misc queries) | |||
Auto enter date | Excel Discussion (Misc queries) | |||
How to auto-enter date when cell is clicked? | Excel Discussion (Misc queries) | |||
Auto enter date? | Excel Discussion (Misc queries) |