View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default fill in date into adjacent cell automatically

Hi,

This question; well to me at least, is confusing. You refer to A2 changing
and putting a date in AB and in your example formula you refer to d7.

To enter a static date automatically you need VB. This will put the
date/time in the adjacent cell if any cell in column A is changed. Right
click your sheet tab, view code and paste the code in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A:A")) Is Nothing Then
Application.EnableEvents = False

Target.Offset(, 1) = Now

Application.EnableEvents = True
End If
End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"FS" wrote:

I creating a basic checklist in an Excel spread sheet and need advice on how
to fill a static date into the adjacent cell. e.g. when I type any caracter
into A2, I need the current date so fill in automatically into AB. The date
must not reset each time I open the work sheet. So far, I got this formula.
=IF(D7="?", NOW(), "")
However, I don't know what the ? mar should be in order to fill the date
into the adjacent cell by entering any character.
Will appreciate your support.
Thanks, FS.