Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Alias for =today()
I have a column formated for simple date. I'd like to be able to enter "T"
in the cell and have it automatically insert the current date, when leaving the cell. Essentially replacing "T" with =today(). What would be the most efficient way of going about this. Thank you, Luke Slotwinski |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Alias for =today()
Maybe try to give us the whole vlookup statement, and if you have any
idea what its referencing or pulling that would be helpful too. That looks like it is supposed to search down the entire sheet, but its hard without the entire statement or a little more background. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Alias for =today()
How about Tools | AutoCorrect
It is case sensitive and leaving the cell using navigation key will not trigger the change but ENTER and TAB will. Remember - AutoCorrect applies to ALL MS Office apps not just Excel best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Luke Slotwinski" wrote in message ... I have a column formated for simple date. I'd like to be able to enter "T" in the cell and have it automatically insert the current date, when leaving the cell. Essentially replacing "T" with =today(). What would be the most efficient way of going about this. Thank you, Luke Slotwinski |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Alias for =today()
You could right-click the sheet tab, select view code and insert the
following code. Change C5 (in the code) to the appropriate cell. The $ signs are required. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo LeaveSub Application.EnableEvents = False If Target.Address = "$C$5" And Target.Value = "T" Then Target.Value = Date End If LeaveSub: Application.EnableEvents = True End Sub '------------ "Luke Slotwinski" wrote in message I have a column formated for simple date. I'd like to be able to enter "T" in the cell and have it automatically insert the current date, when leaving the cell. Essentially replacing "T" with =today(). What would be the most efficient way of going about this. Thank you, Luke Slotwinski |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Alias for =today()
Another way to do this is to write "on change" code for a certain
column or range of cells. The (VBA) code would direct Excel to replace a cell with the formula =TODAY() if that cell was changed to T. Do you want the TODAY() formula, which would change from day to day because the date changes each day, or do you need a static value in that cell that indicates the date you entered that T? |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Alias for =today()
Couldn't you just use a resident procedure of:
<Ctrl < ; (control semi-colon) Will return the current date in whatever date format you pre-formatted the cell (column) to. -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Luke Slotwinski" wrote in message ... I have a column formated for simple date. I'd like to be able to enter "T" in the cell and have it automatically insert the current date, when leaving the cell. Essentially replacing "T" with =today(). What would be the most efficient way of going about this. Thank you, Luke Slotwinski |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Alias for =today()
Luke
Can be done a couple of different ways. Do you want the updating function of TODAY() or just have a static date entered? 1. Select range or column and InsertNameDefine. Name "T"(no quotes) Refers to =TODAY() enter =t to get an updating date in the cell. For a static date just hit CTRL + ; 2. With code you could either a static date or the formula =TODAY() Option Compare Text Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Intersect(Target, Me.Range("A1:A100")) Is Nothing Then Exit Sub On Error GoTo CleanUp Application.EnableEvents = False With Target If .Value = "T" Then ' .Value = Date 'static date only .Value = "=TODAY()" End If End With CleanUp: Application.EnableEvents = True End Sub Gord Dibben MS Excel MVP On Thu, 11 Jan 2007 12:00:03 -0800, Luke Slotwinski wrote: I have a column formated for simple date. I'd like to be able to enter "T" in the cell and have it automatically insert the current date, when leaving the cell. Essentially replacing "T" with =today(). What would be the most efficient way of going about this. Thank you, Luke Slotwinski |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Alias for =today()
Hello, Bernard!
You wrote on Thu, 11 Jan 2007 16:19:50 -0400: BL How about Tools | AutoCorrect BL It is case sensitive and leaving the cell using navigation BL key will not trigger the change but ENTER and TAB will. BL Remember - AutoCorrect applies to ALL MS Office apps not BL just Excel best wishes BL Now that's a really interesting thing to know! Thanks again! ?? I have a column formated for simple date. I'd like to be ?? able to enter "T" in the cell and have it automatically ?? insert the current date, when leaving the cell. ?? Essentially replacing "T" with =today(). What would be the ?? most efficient way of going about this. James Silverton Potomac, Maryland E-mail, with obvious alterations: not.jim.silverton.at.comcast.not |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Importing Outlook Alias into an Excel 2003 macro | Excel Discussion (Misc queries) | |||
SQL query removes alias | Excel Discussion (Misc queries) | |||
Can you use alias' for 'groups' in pivot tables ? | Excel Discussion (Misc queries) | |||
'Alias' for file name..... | Excel Worksheet Functions | |||
MS Query - Alias syntax | Excel Worksheet Functions |