help with formula

brit

New Member
Joined
Aug 24, 2002
Messages
6
Pretty new to all this so I'll explain my problem...

I need to add a value to a cell a1 and for this to be copied to cell b1. However I then want to return the value in cell a1 to 0 or any other value whilst protecting the value in cell b1 and adding the new value of a1 to that protected value.
Can this be done?
If so what formula do I use.
Thanx in advance.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
On 2002-08-25 01:54, brit wrote:
Pretty new to all this so I'll explain my problem...

I need to add a value to a cell a1 and for this to be copied to cell b1. However I then want to return the value in cell a1 to 0 or any other value whilst protecting the value in cell b1 and adding the new value of a1 to that protected value.
Can this be done?
If so what formula do I use.
Thanx in advance.
Hi brit and welcome to the board!

Formula is no good as it will turn to be circular.

you can:
1) enter value in A1
2) copy it and Paste Special to B1 choosing Add option
3) deleting the value in A1
4) goto (1)

You may automate this procedure by Macro

Eli
 
Upvote 0
On 2002-08-25 01:54, brit wrote:
Pretty new to all this so I'll explain my problem...

I need to add a value to a cell a1 and for this to be copied to cell b1. However I then want to return the value in cell a1 to 0 or any other value whilst protecting the value in cell b1 and adding the new value of a1 to that protected value.
Can this be done?
If so what formula do I use.
Thanx in advance.

You might want to experiment with:

=RECALL(A1)+A1

to be entered in B1.

This function is part of the morefunc add-in, available from:

http://longre.free.fr/english/index.html
 
Upvote 0
I'll give that a try, the first answer didn't do what I was attempting, it kept zeroing the answer when cell a1 was deleted.
 
Upvote 0
Right click on the sheet tab and choose View Code. Copy and paste the following into a sheet module (not the ThisWorkbook module) - if you are doing the number accumulation in say sheet 1 then put the code in the sheet 1 module.


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = ("$B$1") Then
Range("$A$1").Value = Range("$A$1").Value + Target.Value
End If
End Sub


Now save the file.

Put your first number in cell B1 - it will also appear in cell A1. The next number that you enter in B1 will be automatically added to the first number in A1 etc.

Kind regards,

Mike
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,039
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top