#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 72
Default Log Sheet

I am trying to create a sheet that tracks the items entered into a certain
cell, or group of cells. What is the simplest code to accomplish this?

Ex:
I have a sheet in workbook "File" named "Log" and another sheet in the same
workbook named "Agenda". I plan on using "Agenda" multiple times, deleting
and re-entering information in the source cells, but I would like "Log" to
keep a list of everything entered in "Agenda".

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Log Sheet

Log sheet A1:C1 has titles of Change Made, Cell Address, Time Changed

Copy this code to sheet module of Agenda.

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:G10"
Dim ocell As Range
Dim wslog As Worksheet
Dim lRow As Long
Set wslog = Sheets("Log")
lRow = wslog.Range("A" & Rows.Count).End(xlUp).Row
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
For Each ocell In Target
If ocell.Value < "" Then
ocell.Copy Destination:=wslog.Range("A" & lRow + 1)
With wslog.Range("B" & lRow + 1)
.Value = ocell.Address
.Offset(0, 1).Value = Format(Now, "hh:mm:ss")
End With
End If
Next ocell
End If
ws_exit:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP


On Thu, 29 Oct 2009 11:01:21 -0700, Shane
wrote:

I am trying to create a sheet that tracks the items entered into a certain
cell, or group of cells. What is the simplest code to accomplish this?

Ex:
I have a sheet in workbook "File" named "Log" and another sheet in the same
workbook named "Agenda". I plan on using "Agenda" multiple times, deleting
and re-entering information in the source cells, but I would like "Log" to
keep a list of everything entered in "Agenda".

Thanks!


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
excel sheet bootom half sheet goes behind top part of sheet rob Excel Worksheet Functions 2 January 17th 09 01:28 AM
Duplicate sheet, autonumber sheet, record data on another sheet des-sa[_2_] Excel Worksheet Functions 0 May 8th 08 06:56 PM
"='sheet 1'!D4" auto fill sheet to sheet ='sheet 2'!D4 mistewalker Excel Worksheet Functions 5 January 6th 08 11:36 PM
How do I select price from sheet.b where sheet.a part no = sheet.b Sonny Excel Worksheet Functions 4 April 4th 06 05:08 PM
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. RonMc5 Excel Discussion (Misc queries) 9 February 3rd 05 12:51 AM


All times are GMT +1. The time now is 11:27 AM.

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

About Us

"It's about Microsoft Excel"