Today() or Date() function help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
First - excuse me for my bad english :)

I want to enter to a cell today() function,
but i don't want the date to change all the time. Example:

Date Time Info Name
01.01.2005 12:45 test Julisimo
01.02.2005 05:32 test2 Ivan

The Date & Time cells - i want to add automatik, but only once.

I hope someone understand me:)
Thanks in advance
 
Can you use keys, Ctrl-:, and Ctrl-Shift-;?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
julisimo said:
Hi,
First - excuse me for my bad english :)

I want to enter to a cell today() function,
but i don't want the date to change all the time. Example:

Date Time Info Name
01.01.2005 12:45 test Julisimo
01.02.2005 05:32 test2 Ivan

The Date & Time cells - i want to add automatik, but only once.

I hope someone understand me:)
Thanks in advance
----------------------------

Faced with the same problem, I just defined a macro to take care of it.
It just puts today() into the selected cell, then copies that cell and
pastes it back onto itself using the "value only" option. It's easy to
record the macro as you go through the steps, then you've got it.

Good luck...

Bill
 
Thanks Bill Martin,
i thing that will be hlpfull form me...
but if you paste some example :) - will be great. I'm not very good in VBS
and macros.

Thanks in advance
 
Sub AddDate()
With ActiveCell
.Value = Date
.NumberFormat = "dd mmm yyyy"
End With
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Hi julisimo,

Why dont u try Bob's suggestion of "Can you use keys, Ctrl-:, and
Ctrl-Shift-;?"

Anyway here's is the VBA macro stuff (modify it as per ur requirements).
Paste this in the VB editor (Alt +F11) after doing INSERT Module

Sub Macro1()
'
' Macro1 Macro

Range("E10").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Range("E10").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

End Sub

Thanks a lot,
Hari
India
 
julisimo said:
Thanks Bill Martin,
i thing that will be hlpfull form me...
but if you paste some example :) - will be great. I'm not very good in VBS
and macros.

Thanks in advance

Bob Phillips gave you one way to do this. Here's how Excel created it
for me just from recording keystrokes (and a little follow up editing to
clean it up):

-------------------
Sub DateToday()
'
' DateToday Macro
' Macro recorded 11/26/2004 by wjm
'
' Keyboard Shortcut: Ctrl+d
'
ActiveCell.FormulaR1C1 = "=TODAY()"
Selection.NumberFormat = "mm/dd/yy"
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False ' Esc key
End Sub
------------------


Good luck...

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top