Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ces
 
Posts: n/a
Default How do I program a cell to automaticinput the current date as dat.

I want to program excel to automatically input the "static date" as I input
text characters in another cell. I've been able to achieve that already in a
similar fashion, however, I don't want the date to change everytime I open
the excel file. Once the date has been entered, I'd like for it to be simple
text and not linked to the computer's time and date stamp. Anyone ever tried
this before?
  #2   Report Post  
Jason Morin
 
Posts: n/a
Default

You would need a Worksheet_Change event. For example, the
code below inputs the the current time into column B when
text is entered into the adjacent cell in col. A:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column 1 Then Exit Sub
If Target.Count 1 Then Exit Sub
Application.ScreenUpdating = False
With Target.Offset(, 1)
.Value = Format(Now, "mm/dd/yy")
Application.ScreenUpdating = True
End With
End Sub
-----

Right-click on the worksheet tab, View Code, and paste
this into the window.

HTH
Jason
Atlanta, GA

-----Original Message-----
I want to program excel to automatically input

the "static date" as I input
text characters in another cell. I've been able to

achieve that already in a
similar fashion, however, I don't want the date to

change everytime I open
the excel file. Once the date has been entered, I'd

like for it to be simple
text and not linked to the computer's time and date

stamp. Anyone ever tried
this before?
.

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
date format within a cell containing a formula Brushie76 Excel Discussion (Misc queries) 1 January 22nd 05 03:50 AM
Formula with text and reference to a date cell [email protected] Excel Discussion (Misc queries) 1 January 11th 05 08:15 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
cell assumes wrong date julie from Seattle Setting up and Configuration of Excel 1 November 30th 04 07:51 PM
Extract date from cell Eric Excel Worksheet Functions 3 November 4th 04 06:37 PM


All times are GMT +1. The time now is 07:19 PM.

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"