ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   I need a date stamp that doesn't change when you enter text (https://www.excelbanter.com/excel-worksheet-functions/93159-i-need-date-stamp-doesnt-change-when-you-enter-text.html)

Eric Hersey

I need a date stamp that doesn't change when you enter text
 
I need code for a date stamp in one cell when you enter text in one other
cell.

Application: A form that will require you to enter your name as a signature
and that it will automatically enter a datestamp above it.

CLR

I need a date stamp that doesn't change when you enter text
 
Change A1 and A2 below to suit your applicaton.

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'================================================
'Inserts date in A1 is any value entered in A2
'Clearcontents on A1 if A2 is clearcontents
'================================================
If Not Range("a2").Value = "" Then
Range("a1").Value = Date '& " " & Time
Else
Range("a1").Value = ""
End If
End Sub


Vaya con Dios,
Chuck, CABGx3


"Eric Hersey" wrote:

I need code for a date stamp in one cell when you enter text in one other
cell.

Application: A form that will require you to enter your name as a signature
and that it will automatically enter a datestamp above it.



All times are GMT +1. The time now is 05:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com