Excel 2003

  • Thread starter Thread starter DAbner
  • Start date Start date
D

DAbner

i need help with excel 2003 where i need to use a cell as an input box to
where i enter a number then press enter and it will keep a running total in a
different cell. Can anyone help with the correct formula.
 
You can do this with VB. Right click on the sheet tab | click View Code |
Paste the following code there

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Address(False, False) = "A1" Then
If IsNumeric(.Value) Then
Application.EnableEvents = False
Range("B1").Value = Range("B1").Value + .Value
Application.EnableEvents = True
End If
End If
End With
End Sub


As per this code, A1 is the input cell and B1 is the cell that will keep the
running total.

Hope this helps.

Thanks
 
Back
Top