I need HELP

  • Thread starter Thread starter Pam Hall
  • Start date Start date
Enter the amount in an empty cell. Select the data where you want to add and
Edit>Paste Special>Add>OK.
 
Pam,

Do you mean add say 7 to cell A1 when A1 already contains say 3, giving a
result of 10?

If so, you need VBA. For instance, this code will add the value of A1 to
whatever is in A1 already.

Dim A1Val

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False
On Error GoTo ws_exit

If Target.Address = "$A$1" Then
Target.Value = A1Val + Target.Value
End If

ws_exit:
Application.EnableEvents = True
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$A$1" Then
A1Val = Target.Value
End If
End Sub

It's worksheet code, so it goes into the worksheet code module.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
No reason to code it in, Bob unless this is a frequent task. Paste
Special>Add works just fine with no decrease in speed..
 
Back
Top