ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Time Question...is this possible? (https://www.excelbanter.com/excel-discussion-misc-queries/44301-time-question-possible.html)

mileslit

Time Question...is this possible?
 

I am fairly new to excel but I have a general understanding of the
software....I am use to using flash for certain things so I find myself
wanting to use and "on click" type reference....Here is what I mean....I
want a formula that tells cell B
when Cell a has data entered, place the Static date into cell B....Now
I understand I could use an if Statement to using "Today" as the true
variable, problem is The "today" variable is not static, it is
constantly updated....Is there a Static Time variable that will
automatically pop in or is the only static time variable the control
shift + :...any advice I can get will be appreciated...Thanks...


--
mileslit
------------------------------------------------------------------------
mileslit's Profile: http://www.excelforum.com/member.php...o&userid=27058
View this thread: http://www.excelforum.com/showthread...hreadid=465761


Rowan

You could use the VBA Date function with a sheet change event:

For example if you wanted the date in column B every time data in column
A was added (or changed) then:

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ErrorHandler
Application.EnableEvents = False
If Target.Count = 1 And Target.Column = 1 Then
Cells(Target.Row, 2).Value = Date
End If
ErrorHandler:
Application.EnableEvents = True
End Sub

This is worksheet event code. Right click the sheet tab, select view
code and paste the code in there.

Hope this helps
Rowan

mileslit wrote:
I am fairly new to excel but I have a general understanding of the
software....I am use to using flash for certain things so I find myself
wanting to use and "on click" type reference....Here is what I mean....I
want a formula that tells cell B
when Cell a has data entered, place the Static date into cell B....Now
I understand I could use an if Statement to using "Today" as the true
variable, problem is The "today" variable is not static, it is
constantly updated....Is there a Static Time variable that will
automatically pop in or is the only static time variable the control
shift + :...any advice I can get will be appreciated...Thanks...




All times are GMT +1. The time now is 03:37 PM.

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