I need HELP

J

Jim

Enter the amount in an empty cell. Select the data where you want to add and
Edit>Paste Special>Add>OK.
 
B

Bob Phillips

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)
 
J

Jim

No reason to code it in, Bob unless this is a frequent task. Paste
Special>Add works just fine with no decrease in speed..
 
B

Bob Phillips

Agreed, I assumed that Pam was looking for this to be a repetitive task.

Bob
 

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