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 quot;IFquot; formula and the quot;NOWquot; 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 quot;date cellquot; and I want to keep it as the date the text was
entered, not quot;NOWquot; or quot;TODAYquot;.
Thanks,
Chris
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
www.mvps.org/dmcritchie/excel/getstarted.htm
then use
Private Sub Worksheet_Change(ByVal Target As Range)
Const WatchRange = quot;B2:B10quot;
If Application.Intersect(Range(WatchRange), Target) Is Nothing Then Exit Sub
Target.Offset(0, 1).Value = Now
End Sub
which puts the current date amp; 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
quot;Chrisquot; wrote:
gt; I have a worksheet that I am trying to create a formula for. What I want is
gt; once a certain cell has text in it, the next cell populates with the date the
gt; first cell was entered. I figured that part out by using a combination of
gt; the quot;IFquot; formula and the quot;NOWquot; formula. But after that function works, I
gt; dont want that date to change, because this worksheet will be continually
gt; working in. When I open the worksheet tomorrow, tomorrow's date will now
gt; show up in the quot;date cellquot; and I want to keep it as the date the text was
gt; entered, not quot;NOWquot; or quot;TODAYquot;.
gt;
gt; Thanks,
gt; Chris
J.E. McGimpsey shows a way to put a time stamp on the same row when something
changes:
www.mcgimpsey.com/excel/timestamp.html
You can read more about events at:
Chip Pearson's site:
www.cpearson.com/excel/events.htm
David McRitchie's site:
www.mvps.org/dmcritchie/excel/event.htm
If you're new to macros, you may want to read David McRitchie's intro at:
www.mvps.org/dmcritchie/excel/getstarted.htm
Chris wrote:
gt;
gt; I have a worksheet that I am trying to create a formula for. What I want is
gt; once a certain cell has text in it, the next cell populates with the date the
gt; first cell was entered. I figured that part out by using a combination of
gt; the quot;IFquot; formula and the quot;NOWquot; formula. But after that function works, I
gt; dont want that date to change, because this worksheet will be continually
gt; working in. When I open the worksheet tomorrow, tomorrow's date will now
gt; show up in the quot;date cellquot; and I want to keep it as the date the text was
gt; entered, not quot;NOWquot; or quot;TODAYquot;.
gt;
gt; Thanks,
gt; Chris
--
Dave Peterson
- Mar 13 Thu 2008 20:42
quot;NOWquot; or quot;TODAYquot; date function
close
全站熱搜
留言列表
發表留言
留言列表

