Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Numfric
 
Posts: n/a
Default 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   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

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   Report Post  
Oliver Ferns via OfficeKB.com
 
Posts: n/a
Default

Try putting

Application.Volatile True

In your UDF.

Hth,
Oli

--
Message posted via http://www.officekb.com
  #4   Report Post  
Numfric
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Maintaining cell reference after sorting GRITS Excel Discussion (Misc queries) 2 April 30th 23 07:42 PM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


All times are GMT +1. The time now is 08:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"