ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do i add in a last updated function for a series of cells? (https://www.excelbanter.com/excel-worksheet-functions/142070-how-do-i-add-last-updated-function-series-cells.html)

Tab

How do i add in a last updated function for a series of cells?
 
How do i add in a last updated function for a series of cells? I want to be
able to see when users update information.

pshepard

How do i add in a last updated function for a series of cells?
 
You can go to the Tools menu, Track Changes submenu, Highlight Changes,
select the range of cells.

Peggy

"Tab" wrote:

How do i add in a last updated function for a series of cells? I want to be
able to see when users update information.


Tab

How do i add in a last updated function for a series of cells?
 
Thank you, perhaps my email was not very clear. i am trying to get a script
for the date at the end of each line to show the last updated date.

Thanks again for your efforts however!

"pshepard" wrote:

You can go to the Tools menu, Track Changes submenu, Highlight Changes,
select the range of cells.

Peggy

"Tab" wrote:

How do i add in a last updated function for a series of cells? I want to be
able to see when users update information.


Joerg

How do i add in a last updated function for a series of cells?
 
Maybe something like the following demo macro. It assumes that you want to
log changes of range A1:C1.
D1 contains a 'snapshot' of the cell contents of this range. After each
change in range A1:C1 the macro takes another snapshot. If it's different
from the previously saved in D1, it logs the time into E1 and also updates
the snapshot in D1.

The macro has to be placed into code sheet of the worksheet for which you
want to use it (open the macro editor with Alt+F11, in the Project window
doubleclick a sheet of the workbook you want to use and put the code into
the big input space on the right side).

Private Sub Worksheet_Change(ByVal Target As Range)
Dim txt
For Each cell In Range("A1:C1")
txt = txt & cell.Text
Next
If txt < Range("D1") Then
Range("E1") = "Last change: " & Now()
Range("D1") = txt
End If
End Sub


Cheers,

Joerg Mochikun





"Tab" wrote in message
...
Thank you, perhaps my email was not very clear. i am trying to get a
script
for the date at the end of each line to show the last updated date.

Thanks again for your efforts however!

"pshepard" wrote:

You can go to the Tools menu, Track Changes submenu, Highlight Changes,
select the range of cells.

Peggy

"Tab" wrote:

How do i add in a last updated function for a series of cells? I want
to be
able to see when users update information.




pshepard

How do i add in a last updated function for a series of cells?
 
Hi Tab,

Copy the following sub routine, right click on the worksheet tab and select
View Code; then paste into the Visual Basic for the worksheet.

Let me know how this works for you.

Thanks,
Peggy


Private Sub Worksheet_Change(ByVal Target As Range)

'Txt is the cocatenated text from the target row

Dim txt
For Each cell In Range(Cells(Target.Row, 1), Cells(Target.Row, 25))
txt = txt & cell.Text
Next

'The following checks the first 25 columns for changes

If Target.Column < 26 And txt < Cells(Target.Row, 27).Text Then
Cells(Target.Row, 26).Select

'The following enters current time as value

ActiveCell.FormulaR1C1 = "=NOW()"
ActiveCell.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

'The following returns the cursor to the target cell

Cells(Target.Row, Target.Column).Select
Application.CutCopyMode = False
Cells(Target.Row, 27) = txt
End If
End Sub




"Tab" wrote:

Thank you, perhaps my email was not very clear. i am trying to get a script
for the date at the end of each line to show the last updated date.

Thanks again for your efforts however!

"pshepard" wrote:

You can go to the Tools menu, Track Changes submenu, Highlight Changes,
select the range of cells.

Peggy

"Tab" wrote:

How do i add in a last updated function for a series of cells? I want to be
able to see when users update information.



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

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