Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default How do I add/count numbers in the same cell in excel worksheet?

How do I create a function or formula in acell to perform this operation?
(i.e if I have the number 127 in a cell and want to to enter 50 into the same
cell so that I get a sum of 177 in the same cell, how do I do this, rather
than adding the 2 numbers in my head, and manually entering 177?) I am doing
this for purposes of a budget and entering receipts. If the amount I've
spent on groceries is $127 up to the present time, and I want to add an
additional grocery receipt of $50, I want to be able to have the cell add the
new entry, rather than adding the 50 in my head and enter $177. Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 87
Default How do I add/count numbers in the same cell in excel worksheet?

Probably the wisest way to use one cell to do this would be to put the
following in the cell:

=127

When you get a $50 receipt, change it to:

=127+50

When you get another receipt, say 34.95:

=127+50+34.95

The reason to do it this way is so that if you happen to make a mistake
when entering the value, you don't lose your previous data.

Scott

Brecken wrote:
How do I create a function or formula in acell to perform this operation?
(i.e if I have the number 127 in a cell and want to to enter 50 into the same
cell so that I get a sum of 177 in the same cell, how do I do this, rather
than adding the 2 numbers in my head, and manually entering 177?) I am doing
this for purposes of a budget and entering receipts. If the amount I've
spent on groceries is $127 up to the present time, and I want to add an
additional grocery receipt of $50, I want to be able to have the cell add the
new entry, rather than adding the 50 in my head and enter $177. Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default How do I add/count numbers in the same cell in excel worksheet

Isn't there another way that's easier, though, so I can just add a number and
have it automatically added to the existing number in the same cell? Thanks.

"Scott" wrote:

Probably the wisest way to use one cell to do this would be to put the
following in the cell:

=127

When you get a $50 receipt, change it to:

=127+50

When you get another receipt, say 34.95:

=127+50+34.95

The reason to do it this way is so that if you happen to make a mistake
when entering the value, you don't lose your previous data.

Scott

Brecken wrote:
How do I create a function or formula in acell to perform this operation?
(i.e if I have the number 127 in a cell and want to to enter 50 into the same
cell so that I get a sum of 177 in the same cell, how do I do this, rather
than adding the 2 numbers in my head, and manually entering 177?) I am doing
this for purposes of a budget and entering receipts. If the amount I've
spent on groceries is $127 up to the present time, and I want to add an
additional grocery receipt of $50, I want to be able to have the cell add the
new entry, rather than adding the 50 in my head and enter $177. Thanks!



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 138
Default How do I add/count numbers in the same cell in excel worksheet?

For a start, put following code into a module. When you run the
AddValueOnEnter macro, whatever value you enter will be added to the
existing value (your existing '127' will become '=127+50', so that you can
still trace your inputs). Run ResetEnter when you want to reset the ENTER
key to normal behaviour.

Cheers,
Joerg Mochikun


Public PresentValue As String

Sub AddValueOnEnter()
Application.OnKey "{ENTER}", "AddValue"
End Sub

Sub ResetEnter()
Application.OnKey "{ENTER}", ""
End Sub

Sub Addvalue()
On Error Resume Next
If Left(PresentValue, 1) < "=" Then PresentValue = "=" & PresentValue
ActiveCell.Formula = PresentValue & "+" & ActiveCell.Formula
PresentValue = ActiveCell.Formula
End Sub








"Scott" wrote in message
oups.com...
Probably the wisest way to use one cell to do this would be to put the
following in the cell:

=127

When you get a $50 receipt, change it to:

=127+50

When you get another receipt, say 34.95:

=127+50+34.95

The reason to do it this way is so that if you happen to make a mistake
when entering the value, you don't lose your previous data.

Scott

Brecken wrote:
How do I create a function or formula in acell to perform this

operation?
(i.e if I have the number 127 in a cell and want to to enter 50 into the

same
cell so that I get a sum of 177 in the same cell, how do I do this,

rather
than adding the 2 numbers in my head, and manually entering 177?) I am

doing
this for purposes of a budget and entering receipts. If the amount I've
spent on groceries is $127 up to the present time, and I want to add an
additional grocery receipt of $50, I want to be able to have the cell

add the
new entry, rather than adding the 50 in my head and enter $177.

Thanks!



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default How do I add/count numbers in the same cell in excel worksheet

Put your 50 in a spare cell, Copy, go to the cell with your 127, Edit/ Paste
Special/ Add
--
David Biddulph

"Brecken" wrote in message
...
Isn't there another way that's easier, though, so I can just add a number
and
have it automatically added to the existing number in the same cell?
Thanks.

"Scott" wrote:

Probably the wisest way to use one cell to do this would be to put the
following in the cell:

=127

When you get a $50 receipt, change it to:

=127+50

When you get another receipt, say 34.95:

=127+50+34.95

The reason to do it this way is so that if you happen to make a mistake
when entering the value, you don't lose your previous data.

Scott

Brecken wrote:
How do I create a function or formula in acell to perform this
operation?
(i.e if I have the number 127 in a cell and want to to enter 50 into
the same
cell so that I get a sum of 177 in the same cell, how do I do this,
rather
than adding the 2 numbers in my head, and manually entering 177?) I am
doing
this for purposes of a budget and entering receipts. If the amount
I've
spent on groceries is $127 up to the present time, and I want to add an
additional grocery receipt of $50, I want to be able to have the cell
add the
new entry, rather than adding the 50 in my head and enter $177.
Thanks!







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default How do I add/count numbers in the same cell in excel worksheet

Brecken

Are you sure you want to do this?

Think about it after reading the following.

You can have a cumulative total in a cell if you have a
separate source cell for adding a new total to the original.

Use at your own risk. I am Posting this just to show you how it can
be done, not as a good solution. You would be much better off to
have another column so you can keep track of past entries.

Goes like this: =IF(CELL("address")="$C$4",C4+D4,D4)

Enter this in cell D4 and then in ToolsOptionsCalculation check
Iterations and set to 1.

Now when you change the number in C4, D4 will accumulate.

Note 1. If C4 is selected and a calculation takes place anywhere in
the Application D4 will update even if no new number is entered in
C4. NOT GOOD.

Note 2. This operation is not recommended because you will have no
"paper trail" to follow. Any mistake in entering a new number in C4
cannot be corrected. NOT GOOD.

To clear out the accumulated total in D4 and start over, select D4
and EditEnter.

Check out Laurent Longre's MoreFunc.xla. Has a Function RECALL
which does what you want without the re-calculation problem, but
again there is no "paper trail" for back-checking in case of errors
in data input.

http://longre.free.fr/english/func_cats.htm

Also see John McGimpsey's site for VBA method and the same caveats as above.

http://www.mcgimpsey.com/excel/accumulator.html


Gord Dibben Excel MVP

On Wed, 10 Jan 2007 22:21:01 -0800, Brecken
wrote:

Isn't there another way that's easier, though, so I can just add a number and
have it automatically added to the existing number in the same cell? Thanks.

"Scott" wrote:

Probably the wisest way to use one cell to do this would be to put the
following in the cell:

=127

When you get a $50 receipt, change it to:

=127+50

When you get another receipt, say 34.95:

=127+50+34.95

The reason to do it this way is so that if you happen to make a mistake
when entering the value, you don't lose your previous data.

Scott

Brecken wrote:
How do I create a function or formula in acell to perform this operation?
(i.e if I have the number 127 in a cell and want to to enter 50 into the same
cell so that I get a sum of 177 in the same cell, how do I do this, rather
than adding the 2 numbers in my head, and manually entering 177?) I am doing
this for purposes of a budget and entering receipts. If the amount I've
spent on groceries is $127 up to the present time, and I want to add an
additional grocery receipt of $50, I want to be able to have the cell add the
new entry, rather than adding the 50 in my head and enter $177. Thanks!




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
Excel won't stop rounding numbers. Please help [email protected] Excel Discussion (Misc queries) 9 December 18th 06 08:38 PM
How do I prevent entering duplicate numbers in an excel worksheet Bran5956 Excel Worksheet Functions 1 October 23rd 06 06:03 PM
How do I get ONLY new info from 1 Worksheet to another automatical Elaine Excel Worksheet Functions 6 July 13th 06 05:45 PM
Adding a row to worksheet does not update cell references in another. blausen Excel Worksheet Functions 5 February 25th 06 10:14 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 08:16 PM


All times are GMT +1. The time now is 09:39 PM.

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

About Us

"It's about Microsoft Excel"