Help! Current Date in a column

  • Thread starter Thread starter Glynn Furr
  • Start date Start date
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 ..
 
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top