You may be able to adapt this to your needs. Say in Sheet1 we make manual
changes to cell A1. Every time we manually change A1 we want to record the
new value and the date in Sheet2, in a running list. In the worksheet code
area for Sheet1 enter:
Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Set ra = Range("A1")
Set s2 = Sheets("Sheet2")
If Intersect(ra, t) Is Nothing Then Exit Sub
v = ra.Value
n = s2.Cells(Rows.Count, 1).End(xlUp).Row + 1
Application.EnableEvents = False
s2.Cells(n, 1).Value = v
s2.Cells(n, 2).Value = Date
Application.EnableEvents = True
End Sub
Because it is worksheet code, it is very easy to install and automatic to use:
1. right-click the tab name near the bottom of the Excel window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window
If you have any concerns, first try it on a trial worksheet.
If you save the workbook, the macro will be saved with it.
To remove the macro:
1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window
To learn more about macros in general, see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
To learn more about Event Macros (worksheet code), see:
http://www.mvps.org/dmcritchie/excel/event.htm
--
Gary''s Student - gsnu200779
"Leanne" wrote:
Hi,
Sorry but this is probably a first grade question but I am so new to VBA
that I am still working out how to type in code!
All I want to do is ensure that when I have done the function I want that I
am taken to the next available cell.
Basically what I am trying to do (and probably the wrong way) is keep a
record of entries in a field that constantly changes. When something else is
changed it is updated but I want to keep a record of all the dates in that
field.
Please help