Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
CAD Concepts
 
Posts: n/a
Default Continuall Add ing values in a cell

Hi Everyone-

I suspect that this question has been asked before but it is difficult to
know how to find the correct thread. That being said, here it goes. I would
like to make a cell continually add values entered into them. For example,
I have a cell that has a value of $12.37 and I have to add to it a new value
as I encounter it, lets say $8.73. As it stands know, I pull out my trusty
calculator andsum up the two values and key in the sum into the field. I
have a pile of recites that I need to add as they come up. Any help is
greatly appreciated.

Manuel A. Ayala
CAD Concepts, LLC
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Worksheet_Change(ByVal target As Range)
Static nAmount

On Error GoTo ws_exit:
Application.EnableEvents = False
If target.Address(False, False) = "H10" Then
target.Value = target.Value + nAmount
nAmount = target.Value
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

RP
(remove nothere from the email address if mailing direct)


"CAD Concepts" wrote in message
...
Hi Everyone-

I suspect that this question has been asked before but it is difficult to
know how to find the correct thread. That being said, here it goes. I

would
like to make a cell continually add values entered into them. For

example,
I have a cell that has a value of $12.37 and I have to add to it a new

value
as I encounter it, lets say $8.73. As it stands know, I pull out my

trusty
calculator andsum up the two values and key in the sum into the field. I
have a pile of recites that I need to add as they come up. Any help is
greatly appreciated.

Manuel A. Ayala
CAD Concepts, LLC



  #3   Report Post  
CAD Concepts
 
Posts: n/a
Default


Hi Bob-

I pasted the code as you suggested but I must be missing something because
it doesn't seem to work. Do I have set some format in the cell to make it
work? Also, when inputting do I just click on the cell and enter the value I
want added to the existing.? Please advise. Thanks.

Manuel

"Bob Phillips" wrote:

Private Sub Worksheet_Change(ByVal target As Range)
Static nAmount

On Error GoTo ws_exit:
Application.EnableEvents = False
If target.Address(False, False) = "H10" Then
target.Value = target.Value + nAmount
nAmount = target.Value
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

RP
(remove nothere from the email address if mailing direct)


"CAD Concepts" wrote in message
...
Hi Everyone-

I suspect that this question has been asked before but it is difficult to
know how to find the correct thread. That being said, here it goes. I

would
like to make a cell continually add values entered into them. For

example,
I have a cell that has a value of $12.37 and I have to add to it a new

value
as I encounter it, lets say $8.73. As it stands know, I pull out my

trusty
calculator andsum up the two values and key in the sum into the field. I
have a pile of recites that I need to add as they come up. Any help is
greatly appreciated.

Manuel A. Ayala
CAD Concepts, LLC




  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Yes, all you do is enter values. Note the point at the end about where you
put the code. Be aware that this starts afresh for each excel seesion..

--

HTH

RP
(remove nothere from the email address if mailing direct)


"CAD Concepts" wrote in message
...

Hi Bob-

I pasted the code as you suggested but I must be missing something because
it doesn't seem to work. Do I have set some format in the cell to make it
work? Also, when inputting do I just click on the cell and enter the

value I
want added to the existing.? Please advise. Thanks.

Manuel

"Bob Phillips" wrote:

Private Sub Worksheet_Change(ByVal target As Range)
Static nAmount

On Error GoTo ws_exit:
Application.EnableEvents = False
If target.Address(False, False) = "H10" Then
target.Value = target.Value + nAmount
nAmount = target.Value
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

RP
(remove nothere from the email address if mailing direct)


"CAD Concepts" wrote in message
...
Hi Everyone-

I suspect that this question has been asked before but it is difficult

to
know how to find the correct thread. That being said, here it goes.

I
would
like to make a cell continually add values entered into them. For

example,
I have a cell that has a value of $12.37 and I have to add to it a new

value
as I encounter it, lets say $8.73. As it stands know, I pull out my

trusty
calculator andsum up the two values and key in the sum into the field.

I
have a pile of recites that I need to add as they come up. Any help

is
greatly appreciated.

Manuel A. Ayala
CAD Concepts, LLC






  #5   Report Post  
Mark
 
Posts: n/a
Default

Hi,

If you do not get a reasonable response from this forum,
you can send your worksheet to me and maybe I can write a
macro to dothe task.

See some of my excel stuff at:
http://www.geocities.com/excelmarksway


regards
mark



-----Original Message-----
Hi Everyone-

I suspect that this question has been asked before but it

is difficult to
know how to find the correct thread. That being said,

here it goes. I would
like to make a cell continually add values entered into

them. For example,
I have a cell that has a value of $12.37 and I have to

add to it a new value
as I encounter it, lets say $8.73. As it stands know, I

pull out my trusty
calculator andsum up the two values and key in the sum

into the field. I
have a pile of recites that I need to add as they come

up. Any help is
greatly appreciated.

Manuel A. Ayala
CAD Concepts, LLC
.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can I select two different values for a cell? Parastoo Parto Excel Worksheet Functions 1 March 9th 05 10:47 AM
limit choice in cell to one of two values; Excel Discussion (Misc queries) 3 February 18th 05 09:04 PM
Can a Formula in Cell X modify Cell Y? alMandragor Excel Discussion (Misc queries) 7 February 10th 05 09:51 PM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
Stumped! Collecting values into one cell. AthleteTO Excel Worksheet Functions 5 November 2nd 04 04:24 PM


All times are GMT +1. The time now is 05:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"