Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Though I have been provided with excellent macros for inserting a time stamp
on the corresponding cells of column C for each entry in column B but I'm not able to achieve the goal when pasting an array on column B by getting a full similar height of array on column C. Please Help! Thanx & regards |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Faraz
I finally came up with this code that enters a time stamp in C for each range of cells pasted into B. If C has a time stamp, it will not change. Private Sub Worksheet_Change(ByVal Target As Excel.Range) Dim myrange On Error GoTo enditall Application.EnableEvents = False If Target.Cells.Column = 2 Then myrange = Target.Value For Each myrange In Target If myrange.Offset(0, 1).Value = "" Then myrange.Offset(0, 1).Value = Format(Now, "h:mm:ss") End If Next End If enditall: Application.EnableEvents = True End Sub Alternative........C changes when new cells are copied to B Private Sub Worksheet_Change(ByVal Target As Excel.Range) Dim myrange On Error GoTo enditall Application.EnableEvents = False If Target.Cells.Column = 1 Then myrange = Target.Value Target.Offset(0, 1).Value = Now End If enditall: Application.EnableEvents = True End Sub Gord Just don't try to copy and paste an entire column On Wed, 10 Jan 2007 23:03:00 -0800, FARAZ QURESHI wrote: Though I have been provided with excellent macros for inserting a time stamp on the corresponding cells of column C for each entry in column B but I'm not able to achieve the goal when pasting an array on column B by getting a full similar height of array on column C. Please Help! Thanx & regards |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
GORD
U R GREAT!!!!!!!!!! THANX AGAIN!!!!!!!!!! "Gord Dibben" wrote: Faraz I finally came up with this code that enters a time stamp in C for each range of cells pasted into B. If C has a time stamp, it will not change. Private Sub Worksheet_Change(ByVal Target As Excel.Range) Dim myrange On Error GoTo enditall Application.EnableEvents = False If Target.Cells.Column = 2 Then myrange = Target.Value For Each myrange In Target If myrange.Offset(0, 1).Value = "" Then myrange.Offset(0, 1).Value = Format(Now, "h:mm:ss") End If Next End If enditall: Application.EnableEvents = True End Sub Alternative........C changes when new cells are copied to B Private Sub Worksheet_Change(ByVal Target As Excel.Range) Dim myrange On Error GoTo enditall Application.EnableEvents = False If Target.Cells.Column = 1 Then myrange = Target.Value Target.Offset(0, 1).Value = Now End If enditall: Application.EnableEvents = True End Sub Gord Just don't try to copy and paste an entire column On Wed, 10 Jan 2007 23:03:00 -0800, FARAZ QURESHI wrote: Though I have been provided with excellent macros for inserting a time stamp on the corresponding cells of column C for each entry in column B but I'm not able to achieve the goal when pasting an array on column B by getting a full similar height of array on column C. Please Help! Thanx & regards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date and time stamping multiple cells for multiple entries. | Excel Worksheet Functions | |||
link multiple cells to multiple cells | Excel Discussion (Misc queries) | |||
Combine Date & Time Cells | Excel Discussion (Misc queries) | |||
Combine Date & Time Cells | Excel Discussion (Misc queries) | |||
Time Stamp without change | Excel Discussion (Misc queries) |