ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   "NOW" or "TODAY" date function (https://www.excelbanter.com/excel-worksheet-functions/84046-now-today-date-function.html)

Chris

"NOW" or "TODAY" date function
 
I have a worksheet that I am trying to create a formula for. What I want is
once a certain cell has text in it, the next cell populates with the date the
first cell was entered. I figured that part out by using a combination of
the "IF" formula and the "NOW" formula. But after that function works, I
dont want that date to change, because this worksheet will be continually
working in. When I open the worksheet tomorrow, tomorrow's date will now
show up in the "date cell" and I want to keep it as the date the text was
entered, not "NOW" or "TODAY".

Thanks,
Chris

Duke Carey

"NOW" or "TODAY" date function
 
You'll need a macro to put a timestamp value in. Start with this site to
learn the rudiments of where code goes,

For information on installing the code see
Getting Started with Macros and User Defined Functions
http://www.mvps.org/dmcritchie/excel/getstarted.htm

then use

Private Sub Worksheet_Change(ByVal Target As Range)
Const WatchRange = "B2:B10"

If Application.Intersect(Range(WatchRange), Target) Is Nothing Then Exit Sub

Target.Offset(0, 1).Value = Now

End Sub

which puts the current date & time into col C next to any change in B2:B10.
Change the WatchRange text to reflect the address of the range you want to use



"Chris" wrote:

I have a worksheet that I am trying to create a formula for. What I want is
once a certain cell has text in it, the next cell populates with the date the
first cell was entered. I figured that part out by using a combination of
the "IF" formula and the "NOW" formula. But after that function works, I
dont want that date to change, because this worksheet will be continually
working in. When I open the worksheet tomorrow, tomorrow's date will now
show up in the "date cell" and I want to keep it as the date the text was
entered, not "NOW" or "TODAY".

Thanks,
Chris


Dave Peterson

"NOW" or "TODAY" date function
 
J.E. McGimpsey shows a way to put a time stamp on the same row when something
changes:

http://www.mcgimpsey.com/excel/timestamp.html

You can read more about events at:
Chip Pearson's site:
http://www.cpearson.com/excel/events.htm

David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/event.htm

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Chris wrote:

I have a worksheet that I am trying to create a formula for. What I want is
once a certain cell has text in it, the next cell populates with the date the
first cell was entered. I figured that part out by using a combination of
the "IF" formula and the "NOW" formula. But after that function works, I
dont want that date to change, because this worksheet will be continually
working in. When I open the worksheet tomorrow, tomorrow's date will now
show up in the "date cell" and I want to keep it as the date the text was
entered, not "NOW" or "TODAY".

Thanks,
Chris


--

Dave Peterson


All times are GMT +1. The time now is 11:22 PM.

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