Log file where each line gets a date stamp when populated and where date is then stored as value

pluginguin

New Member
Joined
Aug 10, 2016
Messages
11
I have a simple log file with a couple of columns to log events. One row for each event.
Every cell in a row is manually entered and there are no macro's or formula's yet.
To prevent mistakes I now want to make a modification in column A... the date column.
As soon as one of the other cells in the row is populated I want the cell in column A to be populated with the date of today.
This can be achieved with a formula. But here is the challenge:

Once the row is populated and the date stamp is there, I want to change the date into a normal date value, so it doesn't change anymore if cells are emptied again or the file is reopened.
The rest of the column should still have the formula in place for future events.

I can find many posts about date formulas and worksheet change by value code but nothing where these two requests are bundled and comprehensive.

Can someone help me out please?

Thanks in advance
 

Some videos you may like

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

footoo

Well-known Member
Joined
Sep 21, 2016
Messages
3,181
Office Version
  1. 2016
Platform
  1. Windows
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cel as Range
Application.EnableEvents = False
For Each cel In Intersect([A:A], Target.EntireRow)
    If Len(cel) = 0 Then cel = Date
Next
Application.EnableEvents = True
End Sub
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,122,162
Messages
5,594,615
Members
413,917
Latest member
devansh02

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
Top