ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help! Current Date in a column (https://www.excelbanter.com/excel-worksheet-functions/91991-help-current-date-column.html)

Glynn Furr

Help! Current Date in a column
 
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 ..



excelent

Help! Current Date in a column
 
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


Ian P

Help! Current Date in a column
 
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

"Glynn Furr" wrote:

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 ..




Gord Dibben

Help! Current Date in a column
 
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

On Sat, 3 Jun 2006 10:40:02 -0700, Ian P wrote:

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

"Glynn Furr" wrote:

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 ..






All times are GMT +1. The time now is 12:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com