Thread
:
NOW function question
View Single Post
#
2
Posted to microsoft.public.excel.worksheet.functions
Ardus Petus
Posts: n/a
NOW function question
Assuming you want the timestamp in cell A1,
Right click on the Excel icon on top left corner of your worbook's window
Select Code
Paste the following:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Range("A1") = Format(Now, "dd/mm/yyyy hh:mm:ss")
End Sub
Get back to Excel
Save your workbook
Et voilà!
--
AP
"George Applegate" a écrit dans le message de news:
...
Our company has six locations and we have a master spreadsheet in
place which has a workbook for each location. During the day,
employees from that location will go in and make changes to inventory
measurements on 5-10 products that are tracked.
Then, also during the day, someone in the central office can pull up
the spreadsheet and check the inventories and decide if more product
needs to be ordered.
Problem: would like to know when the last time measurements have been
entered for a location without the user having to enter the date/time.
The "NOW" function would work great, but it updates the workbook cell
whenever you open it, or whenever the workbook is calculated. Is
there a way to CONDITION the "now" function to only run if a change is
made to any cell in a range??
I would like the "now" function cell to only change if a change is
made to the worksheet, not just by someone going in and viewing it.
thanks,
ga
George Applegate
Reply With Quote