How do I create an automatic date entry?

G

Guest

I have entered the following formula into my spreadsheet:
=IF(F8="Complete",TODAY(),"")
The formula enters today's date when I enter the word "complete" into F8.
However, tomorrow, the formula will update to tomorrow's date. Ho can I keep
the date from changing every day after the initial entry?
Thanks,
 
G

Gord Dibben

Event code.......

Option Compare Text
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
On Error GoTo enditall
Application.EnableEvents = False
If Target.Address = "$F$8" Then
If Target.Value = "Complete" Then
Excel.Range("G8").Value = Now
End If
End If
enditall:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste into that module.


Gord Dibben MS Excel MVP
 
G

Guest

This question is so similar to the one that I have....

how could I accomplish this..=IF(F8="Complete",TODAY(),"")

BUT with any text (not a specific word like 'Complete') and in the situation
where any change in a row (a few columns with text and a date column) will
automatically update the date.

Thanks
June
 
R

Roger Govier

Hi June

Maybe
=IF(ISTEXT(F8),TODAY(),"")

--
Regards

Roger Govier


June D said:
This question is so similar to the one that I have....

how could I accomplish this..=IF(F8="Complete",TODAY(),"")

BUT with any text (not a specific word like 'Complete') and in the
situation
where any change in a row (a few columns with text and a date column)
will
automatically update the date.

Thanks
June
 
D

David Biddulph

Try dddd, dd mmmm yyyy, hh:mm
If you look at the custom formats in the default list, you can then vary the
parameters to suit your requirements.
 
F

Fred Smith

Tell us what you tried, and why it didn't do what you want. Then we're better
able to help you.
 

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