View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
WhytheQ WhytheQ is offline
external usenet poster
 
Posts: 246
Default Adding data to a cell via VBA

probably loads of ways of going about this one.
try putting the below in the code window behind the actual worksheet
you are using (rather than in a normal module).
you should be able to adapt this to your needs

all the best
J

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If IsNumeric(Target) Then
Range("B1") = Target.Value + 2
End If
End If
End Sub