Excel 2003

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.
 
G

Gaurav

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top