Help! Current Date in a column

G

Glynn Furr

I am hoping that someone can help me with this.

I have a column that is normally blank in each cell. I place an "X" in a
cell in that column when an event occurs for the Person represented by the
row. What I need is: to have a date column that went the X is placed in the
that cell, the current date is placed in the date column cell for that row.

Can anyone help or point me in the right direction?

Many thanks in advance,

Glynn ..
 
E

excelent

try: put in sheet's code module

Private Sub Worksheet_Change(ByVal Target As Range)
If ActiveCell.Column = 1 Then
If Target = "X" Then
ActiveCell.Offset(-1, 1) = Date ' date in column B
'ActiveCell.Offset(-1, 2) = Date ' date in column C
'ActiveCell.Offset(-1, 3) = Date ' date in column D
ActiveCell.Offset(-1, 1).Columns.AutoFit ' remember to chage this if u
change date column
End If
End If
End Sub
 
I

Ian P

This can be done without VBA using the formula

=if(b1="X",now(),"")

where B1 is the cell that you want to chek for an X.

HTH

Ian
 
G

Gord Dibben

Ian

Unfortunately the now() function will update each time a calculation takes
place.

I believe Glynn would like a static date, which requires VBA.


Gord Dibben MS Excel MVP
 
Top