Column E Offset from column B would be
..Offset(0, 3) instead of .Offset(0, -1)
Offset(Row, Column) is the syntax.
Gord
On Fri, 15 Aug 2008 18:28:45 -0400, "Larry"
<(E-Mail Removed)> wrote:
>Gord, thanks. Your suggestion seems to work great. Now, I don't really want
>the date stamp in column A. How do I change the date stamp to, say, column
>E?
>Thanks.
>Larry
>
>"Gord Dibben" <gorddibbATshawDOTca> wrote in message
>news:(E-Mail Removed)...
>> Private Sub WorkSheet_Change(ByVal Target As Range)
>> On Error GoTo ws_exit:
>> Application.EnableEvents = False
>> If Not Intersect(Target, Me.Range("B:B")) Is Nothing Then
>> With Target
>> If .Value <> "" Then
>> .Offset(0, -1).Value = Format(Now, "dd mmm yyyy hh:mm:ss")
>> End If
>> End With
>> End If
>> ws_exit:
>> Application.EnableEvents = True
>> End Sub
>>
>> Will add a timestamp to cell in column A when a change is made in
>> corresponding cell in row of column B
>>
>> The timestamp does not update unless column A is edited.
>>
>> This is sheet event code. Right-click on the sheet tab and "Viedw Code"
>>
>> Copy/paste into that sheet module.
>>
>> Alt + q to return to the Excel window.
>>
>>
>> Gord Dibben MS Excel MVP
>>
>>
>> On Fri, 15 Aug 2008 15:47:59 -0400, "Larry"
>> <(E-Mail Removed)> wrote:
>>
>>>Hi, I have a situation similar to D. West where I'd like for the current
>>>time and date to be entered in col. A whenever a new row is populated with
>>>values. I tried the setting col. A to: =IF(COUNTA(B3:IV3)<>0,NOW(),"")
>>>like
>>>Gary Brown suggested for D.West. That sort of worked, but I'd like for
>>>that
>>>value to remain, not be subject to recalculation whenever something new is
>>>added to that or other rows. Any way to specify that value to remain
>>>unchanged once it's calculated the first time? Thanks.
>>>Larry
>>>
>>
|