ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   STORE THE DATE & TIME THE VALUE HAS CHANGED IN A CELL (https://www.excelbanter.com/excel-discussion-misc-queries/218301-store-date-time-value-has-changed-cell.html)

Asoka Walpitagama - Brandix College IT

STORE THE DATE & TIME THE VALUE HAS CHANGED IN A CELL
 
Need to store the Date & Time whenever a value is entered to a cell.
If a value is entered to celle B3 then the current date & time should be
saved in C3.

I used the following in cell C3

=IF(B3<"", NOW()," " )

But whenever any operation is done in a cell the Date & Time gets the
current value which I dont want to happen.

Thanks Asoka

Stefi

STORE THE DATE & TIME THE VALUE HAS CHANGED IN A CELL
 
You need an event sub for that:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "B3" Then
Cells(Target.Row, Target.Column + 1) = Date + Time
End If
End Sub

This works only for B3, post if you want to expand its range or need help to
install it!

Regards,
Stefi

€žAsoka Walpitagama - Brandix College IT€ť ezt Ă*rta:

Need to store the Date & Time whenever a value is entered to a cell.
If a value is entered to celle B3 then the current date & time should be
saved in C3.

I used the following in cell C3

=IF(B3<"", NOW()," " )

But whenever any operation is done in a cell the Date & Time gets the
current value which I dont want to happen.

Thanks Asoka



All times are GMT +1. The time now is 05:30 PM.

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