auto insert date

REGULAR JAY

New Member
Joined
Oct 31, 2019
Messages
3
i would like to get date automatically inserted in column J whenever I enter text into column A for all rows, i tried using the toady function but after a few days it refreshes to current date and not the date when i entered the text
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Place this code in the Worksheet Change Event for your Sheet.

Code:
Option Explicit


Private Sub Worksheet_Change(ByVal Target As Range)
    Dim trow As Long
    If Target.Column = 1 Then
        trow = Target.Row
        Range("J" & trow) = Date
    End If


End Sub

Open the VBE (Alt + F11)
Click on the worksheet in question in the left window.
A window will open on the right side of your screen
Paste in the above code.
Save and Close.
 
Upvote 0
@Jay
Who are your comments directed to? I believe that if you install my code, it will not update beyond the first event. If you wish the date to be static and not be automatically installed as I have directed then in column J, then with your cursor in appropriate row of column J, select the Control Key and the semi-colon key at the same time.
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,614
Members
449,090
Latest member
vivek chauhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top