Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Recalculate cell with UDF
I have a cell with the following contents:
=CONCATENATE("Last updated ",TEXT(LastSaved(), "mmmm dd, yyyy")) LastSaved is a UDF with the following definition: Public Function LastSaved() LastSaved = ActiveWorkbook.BuiltinDocumentProperties("Last Save Time") End Function I have automatic recalc turned on. If I save the workbook, exit and bring it up again, the cell value still shows the previous last saved date. If I F2 on the cell and press Enter, the date is refreshed with the current date. What's going on? |
#2
|
|||
|
|||
Hi
Try this: =IF(NOW()0,"Last updated " & TEXT(LastSaved(), "mmmm dd, yyyy")) Arvi Laanemets "Numfric" wrote in message ... I have a cell with the following contents: =CONCATENATE("Last updated ",TEXT(LastSaved(), "mmmm dd, yyyy")) LastSaved is a UDF with the following definition: Public Function LastSaved() LastSaved = ActiveWorkbook.BuiltinDocumentProperties("Last Save Time") End Function I have automatic recalc turned on. If I save the workbook, exit and bring it up again, the cell value still shows the previous last saved date. If I F2 on the cell and press Enter, the date is refreshed with the current date. What's going on? |
#3
|
|||
|
|||
Try putting
Application.Volatile True In your UDF. Hth, Oli -- Message posted via http://www.officekb.com |
#4
|
|||
|
|||
Thank you both for your responses. Both methods work. I went with
Application.Volatile (True is implied), as there is less clutter in the cell. "Oliver Ferns via OfficeKB.com" wrote: Try putting Application.Volatile True In your UDF. Hth, Oli -- Message posted via http://www.officekb.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Maintaining cell reference after sorting | Excel Discussion (Misc queries) | |||
inserting data from a row to a cell, when the row number is specified by a formula in a cell | New Users to Excel | |||
Addition to Turn cell red if today is greater or equal to date in cell | New Users to Excel | |||
GET.CELL | Excel Worksheet Functions | |||
VLookup resulting in a blank cell... | Excel Worksheet Functions |