Excel help

Solved/Closed
Flashrunner Posts 1 Registration date Friday January 17, 2014 Status Member Last seen January 17, 2014 - Jan 17, 2014 at 07:49 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Jan 20, 2014 at 11:10 AM
I am tracking shipments of our product. When I enter the amount that shipped, I would like for that days date to appear in a separate cell and never change unless the shipment amount is changed......any suggestions???
Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Jan 20, 2014 at 11:10 AM
Hi Flashrunner,

Right-click on the sheets tab and select view code. Paste the following code in the big white field:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("A:A")) Is Nothing Then Exit Sub
Range("B" & Target.Row).Value = Date
End Sub

In the code "Columns("A:A")" refers to the column with amounts and "Range("B" & Target.Row)" refers to the column where you want the date to be inserted.

Change these 2 column references to match yours and test the code by entering an amount; the date should be automatically entered.

Best regards,
Trowa

0