Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi,
I have a workbook with multiple sheets. I need an automatically updated cell that updates every time the sheet is edited and I will need this on multiple tabs that update individually only when that specific tab is updated. "Last updated: DD MM YY" Thankyou in advance for any help. |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Thursday, 5 November 2020 at 15:31:17 UTC, meleady420 wrote:
Hi, I have a workbook with multiple sheets. I need an automatically updated cell that updates every time the sheet is edited and I will need this on multiple tabs that update individually only when that specific tab is updated. "Last updated: DD MM YY" Thankyou in advance for any help. Automatically updates with the date! |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
meleady420 wrote:
On Thursday, 5 November 2020 at 15:31:17 UTC, meleady420 wrote: Hi, I have a workbook with multiple sheets. I need an automatically updated cell that updates every time the sheet is edited and I will need this on multiple tabs that update individually only when that specific tab is updated. "Last updated: DD MM YY" Thankyou in advance for any help. Automatically updates with the date! You'll likely need to script it with VBA. Put this in the workbook's ThisWorkbook object: Private changed As Boolean Private Sub Workbook_SheetChange(ByVal Sh As Object, _ ByVal Target As Range) If changed Then Exit Sub changed = True Sh.Range("A1").Value = "Last updated: " & IIf(Day(Now) < 10, "0", "") _ & Day(Now) & IIf(Month(Now) < 10, " 0", " ") & _ Month(Now) & " " & Right(Year(Now), 2) changed = False End Sub Replace "A1" with the address you want the date at, and bear in mind that it will be the same location on each sheet. This will only mark a sheet as updated if it is the updated page, resulting in different dates on each sheet. If you need the date to be the same on each sheet, use this instead, still in ThisWorkbook: Private changed As Boolean Private Sub Workbook_SheetChange(ByVal Sh As Object, _ ByVal Target As Range) If changed Then Exit Sub Dim x As Worksheet changed = True For Each x In Sheets x.Range("A1").Value = "Last updated: " & IIf(Day(Now) < 10, "0", "") _ & Day(Now) & IIf(Month(Now) < 10, " 0", " ") & _ Month(Now) & " " & Right(Year(Now), 2) Next x changed = False End Sub -- Between two evils, I choose the competent one. |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Thursday, 5 November 2020 at 17:41:40 UTC, Auric__ wrote:
meleady420 wrote: On Thursday, 5 November 2020 at 15:31:17 UTC, meleady420 wrote: Hi, I have a workbook with multiple sheets. I need an automatically updated cell that updates every time the sheet is edited and I will need this on multiple tabs that update individually only when that specific tab is updated. "Last updated: DD MM YY" Thankyou in advance for any help. Automatically updates with the date! You'll likely need to script it with VBA. Put this in the workbook's ThisWorkbook object: Private changed As Boolean Private Sub Workbook_SheetChange(ByVal Sh As Object, _ ByVal Target As Range) If changed Then Exit Sub changed = True Sh.Range("A1").Value = "Last updated: " & IIf(Day(Now) < 10, "0", "") _ & Day(Now) & IIf(Month(Now) < 10, " 0", " ") & _ Month(Now) & " " & Right(Year(Now), 2) changed = False End Sub Replace "A1" with the address you want the date at, and bear in mind that it will be the same location on each sheet. This will only mark a sheet as updated if it is the updated page, resulting in different dates on each sheet. If you need the date to be the same on each sheet, use this instead, still in ThisWorkbook: Private changed As Boolean Private Sub Workbook_SheetChange(ByVal Sh As Object, _ ByVal Target As Range) If changed Then Exit Sub Dim x As Worksheet changed = True For Each x In Sheets x.Range("A1").Value = "Last updated: " & IIf(Day(Now) < 10, "0", "") _ & Day(Now) & IIf(Month(Now) < 10, " 0", " ") & _ Month(Now) & " " & Right(Year(Now), 2) Next x changed = False End Sub -- Between two evils, I choose the competent one. Thanks alot for your help but i cant get this working. Any advice much appreciated. - I am in a macro enabled workbook - Alt F11 - Copy and past the test above - Alt Q Am i missing any steps? I have tried then using Alt F8 and changed A1 |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
meleady420 wrote:
[snip] Thanks alot for your help but i cant get this working. Any advice much appreciated. - I am in a macro enabled workbook - Alt F11 - Copy and past the test above - Alt Q Am i missing any steps? I have tried then using Alt F8 and changed A1 * Did you allow macros to run? (Security settings might prevent them from running.) * Did you put it in the workbook's ThisWorkbook object? (It *must* go there.) * Is there already a Sub Workbook_SheetChange? (You'll have to merge them together.) * Did you ensure you were using only one of my subs at a time? (It's one or the other, not both.) * Did you actually make a change in a worksheet? (It's not magic; the code won't fire unless you change some data, not just formatting. Select a blank cell and hit the Del key.) If you answered "yes" to all of the above, then try the page that Thibaud Taudin Chabot linked to. It's a method I'd never heard of before, specifically ActiveWorkbook.BuiltinDocumentProperties("Last Save Time"). -- She had not thought these words as she saw the humans coming to kill, but it was in words that Ender understood her. |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Op 5-11-2020 om 17:11 schreef meleady420:
On Thursday, 5 November 2020 at 15:31:17 UTC, meleady420 wrote: Hi, I have a workbook with multiple sheets. I need an automatically updated cell that updates every time the sheet is edited and I will need this on multiple tabs that update individually only when that specific tab is updated. "Last updated: DD MM YY" Thankyou in advance for any help. Automatically updates with the date! https://www.extendoffice.com/documen...timestamp.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
set up a shared workbook to be view/edited at the same time? | Excel Discussion (Misc queries) | |||
Automatically pu date when cell is edited | Excel Worksheet Functions | |||
Recording the date another cell is edited or modified. | Excel Worksheet Functions | |||
update a date cell only when worksheet is edited | Excel Discussion (Misc queries) | |||
Date last edited | Excel Discussion (Misc queries) |