newbie Q

G

Goran

Hello,
Here is my problem:
I have a column with names (A1- A5), next column (B1-B5) contains some
values (20,23,55,77,90.)
Now I would like to have a column (C1-C5) where I can enter a new values and
then those values would be added to numbers in column B, and stored, so each
time I change value of C1 the result will be displayed in the B1 and stored.
Basicaly if B1 is 20 and I type 5 in C1 value of B1 becomes 25, then I type
again in C1 10 and value of B1 becomes 35.

Any ideas ?
/thanx
 
A

Anto

Hi there.

This isn't a very elegant solution, and I wouldn't want to use it on a
huge spreadsheet, but it does what you ask and is a quick fix.

Paste it into the sheet you're using in VBE and away you go.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
' Update The Values In Column B
Range("B1").Value = Range("B1").Value + Range("C1").Value
Range("B2").Value = Range("B2").Value + Range("C2").Value
Range("B3").Value = Range("B3").Value + Range("C3").Value
Range("B4").Value = Range("B4").Value + Range("C4").Value
Range("B5").Value = Range("B5").Value + Range("C5").Value
Range("C1:C5").ClearContents
End Sub
 
G

Goran Stjepanovic

Hello Anto,
So there is no function in Excel that will do this...?
Only way is to use VBA?
/Goran
 
P

Peo Sjoblom

You can obviously not both eat the cake and keep it so you can't type a
value in B1 and also have a formula, you can do tools>options>calculations,
check iteration and change maximum iterations to 1 Now in B1 you can use

=B1+C10

it will change and accumulate for every value you type in C1.

However I would not recommend using, there is no audit tracking you can do

--

Regards,

Peo Sjoblom


Goran Stjepanovic said:
Hello Anto,
So there is no function in Excel that will do this...?
Only way is to use VBA?
/Goran
 

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