Who knows, you might be able to adapt Bullen's technique which makes use of circular reference to your problem. See his file 'lastchng.xls' at:
http://www.BMSLtd.co.uk
Aladin
Hi Jean
If you don't want a circular reference
then you could place some code like this in your worksheet module. Right click on the sheet name tab and select "View Code" then paste this code in.
Dim Val
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Cells.Count <> 1 Then Exit Sub
If Target.Address = "$A$1" And IsNumeric(Target) Then
Application.EnableEvents = False
Target = Target + Val
Application.EnableEvents = True
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Cells.Count <> 1 Then Exit Sub
If Target.Address = "$A$1" And IsNumeric(Target) Then
Application.EnableEvents = False
Val = Target
Application.EnableEvents = True
End If
End Sub
Change the address to suit and push Alt+Q then save.
Dave
- OzGrid Business Applications