EXCEL

Joined
Mar 21, 2012
Messages
1
Reaction score
0
I need the formula for when I enter a letter such as P into a blank cell I want it to display todays date. how do I do this? Also i need that date to stay original the next day I open the spreadsheet. Any suggestions would be appreciated.

Thanks
 
You could take the following code and assign it to a button. I'm a relative novice at VBA, so there may be better ways.
Code:
Sub Today()
'
' This will enter the formula =TODAY() in the selected cell.
' Then use Copy and Paste Special | Values to paste the result so that it doesn't update
 
ActiveCell.FormulaR1C1 = "=TODAY()"
ActiveCell.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End Sub
 
Back
Top