Clarification

R

Ruslan

to make it clear...is it possible to make excel add automatically date in,
for example, A10 column when I enter information in B10 ?
 
E

Earl Kiosterud

Rusian,

This will put the latest date in column A any time you add or change any
information in B:D:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B:D")) Is Nothing Then
Cells(Target.Row, 1) = Now
End If
End Sub

This will put the date in column A the first time you put information into a
row in B:D, but won't change it if you add or change information later in a
row that already has a date in column A.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B:D")) Is Nothing And
IsEmpty(Cells(Target.Row, 1)) Then
Cells(Target.Row, 1) = Now
End If

Paste it from here into the sheet module in the VBE.
 
B

Bernard Liengme

If you meant to type 01/01/1900 then this is a date - 1 Jan 1900
Are you looking for a time? Try formatting the cell with Time
best wishes
 
S

Suprdave74

I too need to have static dates automatically entered when I enter
information in cell A or B and put the current static date in cell C, but I
have a workbook with several tabs in it and the source cells and target cells
are not in the same place on all of them. Does this work across all tabs or
do you need to specify what tab it affects?

In my application I am putting an "X" in a cell to indicate that I tested
the device (one column for pass and another for fail) and I would like the
current date to be inserted into a seperate cell. I tried using
=IF(J8="X",TODAY()," ") in the date column (for a passing situation, usually
not much fails), but every time I opened the workbook it would recalculate
and change the date to the current date.
 

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

Top