View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default NOW function question

Hi George:

Enter this into worksheet code:

Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Range("A2:A10"), Target) Is Nothing Then Exit Sub
Application.EnableEvents = False
Range("A1").Value = Now()
Application.EnableEvents = True
End Sub

The routine will activate if cells in the range A2 thru A10 are changed via
editting.
When the change occurs, the date/time is deposited in cell A1.

REMEMBER: worksheet code
--
Gary's Student


"George Applegate" wrote:

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