Thread: Adding on excel
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default Adding on excel

A code solution

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "$A$2"

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Address = WS_RANGE Then
With Target
.Offset(1, 0).Value = .Value + .Offset(1, 0).Value
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Laura ( '_' )" wrote in message
...

Excel 2000

Hiya, I have a question for all you brainboxes out there!
Im VERY new to excel so please explain clearly or I'll be completley

lost!!

In the cell A3 I would like to have a "Grand Total".
In the cell A2, I would like to enter a number, eg. 400 (this would then
appear in A3 as 400), THEN I would like to enter another number, eg. 307

in
cell A2. (this wouuld then appear in A3 as 707).

I hope that explains it, I find it a bit confusing.
Thanks for any help you can offer :)
--
@---}--
Laura..... :)
Liverpool, England