#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 59
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,290
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 427
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 182
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing Outlook Alias into an Excel 2003 macro fidgitthedigit Excel Discussion (Misc queries) 0 May 29th 06 02:24 PM
SQL query removes alias BusterC Excel Discussion (Misc queries) 1 February 8th 06 04:35 PM
Can you use alias' for 'groups' in pivot tables ? Alias in pivot table Excel Discussion (Misc queries) 5 August 6th 05 09:53 PM
'Alias' for file name..... billsc Excel Worksheet Functions 4 July 7th 05 02:18 AM
MS Query - Alias syntax David P Excel Worksheet Functions 3 February 16th 05 09:29 AM


All times are GMT +1. The time now is 06:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"